Refs #28526 -- Provided URLResolver namespace in technical 404 template.
Some checks are pending
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run

This avoids looking up the nonexistent "name" attribute on URLResolver,
which logs verbosely.
This commit is contained in:
Jacob Walls 2025-09-18 12:53:24 -04:00 committed by Sarah Boyce
parent 46bd92274c
commit 7894776bc9
3 changed files with 31 additions and 6 deletions

View file

@ -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):
"""