summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2025-09-18 12:53:24 -0400
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-09-26 14:06:39 +0200
commit7894776bc99e42f20e0919fc9027e6db542957d5 (patch)
treee83b60f583d979fe0c7014f6ab2ec5e049972e5d /tests
parent46bd92274c57fd6f138c067562696092732cec59 (diff)
Refs #28526 -- Provided URLResolver namespace in technical 404 template.
This avoids looking up the nonexistent "name" attribute on URLResolver, which logs verbosely.
Diffstat (limited to 'tests')
-rw-r--r--tests/view_tests/tests/test_debug.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
index 8e36ab7eb1..439faff84e 100644
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -423,6 +423,16 @@ class DebugViewTests(SimpleTestCase):
response, "<h1>The install worked successfully! Congratulations!</h1>"
)
+ @override_settings(ROOT_URLCONF="view_tests.default_urls")
+ def test_default_urlconf_technical_404(self):
+ response = self.client.get("/favicon.ico")
+ self.assertContains(
+ response,
+ "<code>\nadmin/\n[namespace='admin']\n</code>",
+ status_code=404,
+ html=True,
+ )
+
@override_settings(ROOT_URLCONF="view_tests.regression_21530_urls")
def test_regression_21530(self):
"""