mirror of
https://github.com/django/django.git
synced 2025-11-20 11:36:04 +00:00
Refs #28526 -- Provided URLResolver namespace in technical 404 template.
This avoids looking up the nonexistent "name" attribute on URLResolver, which logs verbosely.
This commit is contained in:
parent
46bd92274c
commit
7894776bc9
3 changed files with 31 additions and 6 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue