diff --git a/zerver/lib/test_helpers.py b/zerver/lib/test_helpers.py index f2243183d1..f7b571aa55 100644 --- a/zerver/lib/test_helpers.py +++ b/zerver/lib/test_helpers.py @@ -540,7 +540,7 @@ def write_instrumentation_reports(full_suite: bool, include_webhooks: bool) -> N "docs/", "docs/(?P.+)", "casper/(?P.+)", - "static/(?P.+)", + "static/(?P.*)", "flush_caches", "external_content/(?P[^/]+)/(?P[^/]+)", # Such endpoints are only used in certain test cases that can be skipped diff --git a/zerver/tests/test_urls.py b/zerver/tests/test_urls.py index b7f89ae72e..08bb51ac8f 100644 --- a/zerver/tests/test_urls.py +++ b/zerver/tests/test_urls.py @@ -1,8 +1,6 @@ -import importlib import os from unittest import mock -import django.urls.resolvers from django.test import Client from zerver.lib.test_classes import ZulipTestCase @@ -13,7 +11,6 @@ from zerver.lib.url_redirects import ( POLICY_DOCUMENTATION_REDIRECTS, ) from zerver.models import Stream -from zproject import urls class PublicURLTest(ZulipTestCase): @@ -158,21 +155,6 @@ class PublicURLTest(ZulipTestCase): ) -class URLResolutionTest(ZulipTestCase): - def check_function_exists(self, module_name: str, view: str) -> None: - module = importlib.import_module(module_name) - self.assertTrue(hasattr(module, view), f"View {module_name}.{view} does not exist") - - # Tests function-based views declared in urls.urlpatterns for - # whether the function exists. We at present do not test the - # class-based views. - def test_non_api_url_resolution(self) -> None: - for pattern in urls.urlpatterns: - if isinstance(pattern, django.urls.resolvers.URLPattern): - (module_name, base_view) = pattern.lookup_str.rsplit(".", 1) - self.check_function_exists(module_name, base_view) - - class ErrorPageTest(ZulipTestCase): def test_bogus_http_host(self) -> None: # This tests that we've successfully worked around a certain bug in