Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
url tests: Split out expensive test for help pages.
Steve Howellc94bbfbc7a8a
diff --git a/zerver/tests/test_urls.py b/zerver/tests/test_urls.pyindex c52a7ae8ca5..7496ca0acd3 100644--- a/zerver/tests/test_urls.py+++ b/zerver/tests/test_urls.py@@ -33,6 +33,23 @@ class PublicURLTest(ZulipTestCase):msg=f"Expected {expected_status}, received {response.status_code} for {method} to {url}",)+ def test_help_pages(self) -> None:+ # Test all files in help documentation directory (except for 'index.md',+ # 'missing.md' and `help/include/` files).++ help_urls = []+ for doc in os.listdir("./help/"):+ if doc.startswith(".") or "~" in doc or "#" in doc:+ continue # nocoverage -- just here for convenience+ if doc in {"index.md", "include", "missing.md"}:+ continue+ url = "/help/" + os.path.splitext(doc)[0] # Strip the extension.+ help_urls.append(url)++ # We have lots of help files, so this will be expensive!+ self.assertGreater(len(help_urls), 190)+ self.fetch("client_get", help_urls, 200)+def test_public_urls(self) -> None:"""Test which views are accessible when not logged in.@@ -73,14 +90,6 @@ class PublicURLTest(ZulipTestCase):],}- # Add all files in help documentation directory (except for 'index.md',- # 'missing.md' and `help/include/` files) to `get_urls['200']` list.- for doc in os.listdir("./help/"):- if doc.startswith(".") or "~" in doc or "#" in doc:- continue # nocoverage -- just here for convenience- if doc not in {"index.md", "include", "missing.md"}:- get_urls[200].append("/help/" + os.path.splitext(doc)[0]) # Strip the extension.-post_urls = {200: ["/accounts/login/"],302: ["/accounts/logout/"],