From 3a0d66f07b112b6d2bdc2b57bbf717a89a351ce6 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Wed, 3 Feb 2021 19:17:00 -0500 Subject: New upstream version 8.1.2. --- .../integration/test_check_full_path_subfolder.py | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/integration/test_check_full_path_subfolder.py (limited to 'tests/integration/test_check_full_path_subfolder.py') diff --git a/tests/integration/test_check_full_path_subfolder.py b/tests/integration/test_check_full_path_subfolder.py new file mode 100644 index 0000000..e678016 --- /dev/null +++ b/tests/integration/test_check_full_path_subfolder.py @@ -0,0 +1,35 @@ +""" +Validate links in a site which is: + +* built in URL_TYPE="full_path" +* deployable to a subfolder (BASE_URL="https://example.com/foo/") +""" + +import pytest + +from nikola import __main__ + +from .helper import cd, patch_config +from .test_check_absolute_subfolder import test_index_in_sitemap # NOQA +from .test_demo_build import prepare_demo_site +from .test_empty_build import ( # NOQA + test_archive_exists, + test_avoid_double_slash_in_rss, + test_check_files, + test_check_links, +) + + +@pytest.fixture(scope="module") +def build(target_dir): + """Fill the site with demo content and build it.""" + prepare_demo_site(target_dir) + + patch_config( + target_dir, + ('SITE_URL = "https://example.com/"', 'SITE_URL = "https://example.com/foo/"'), + ("# URL_TYPE = 'rel_path'", "URL_TYPE = 'full_path'"), + ) + + with cd(target_dir): + __main__.main(["build"]) -- cgit v1.2.3