Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
test_urls: Remove dead URLResolutionTest.
Anders Kaseorg6c442273ee1d
diff --git a/zerver/lib/test_helpers.py b/zerver/lib/test_helpers.pyindex f2243183d18..f7b571aa55f 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<path>.+)","casper/(?P<path>.+)",- "static/(?P<path>.+)",+ "static/(?P<path>.*)","flush_caches","external_content/(?P<digest>[^/]+)/(?P<received_url>[^/]+)",# Such endpoints are only used in certain test cases that can be skippeddiff --git a/zerver/tests/test_urls.py b/zerver/tests/test_urls.pyindex b7f89ae72e5..08bb51ac8f7 100644--- a/zerver/tests/test_urls.py+++ b/zerver/tests/test_urls.py@@ -1,8 +1,6 @@-import importlibimport osfrom unittest import mock-import django.urls.resolversfrom django.test import Clientfrom 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 urlsclass 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