1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #33425 -- Fixed view name for CBVs on technical 404 debug page.

Regression in 0c0b87725b.
This commit is contained in:
Keryn Knight
2022-01-07 12:57:03 +00:00
committed by Mariusz Felisiak
parent 7346c288e3
commit 2a66c102d9
3 changed files with 17 additions and 5 deletions

View File

@@ -177,7 +177,11 @@ class DebugViewTests(SimpleTestCase):
html=True,
)
self.assertContains(response, "Raised by:", status_code=404)
self.assertContains(response, "view_tests.views.technical404", status_code=404)
self.assertContains(
response,
'<td>view_tests.views.technical404</td>',
status_code=404,
)
self.assertContains(
response,
'<p>The current path, <code>technical404/</code>, matched the '
@@ -188,8 +192,12 @@ class DebugViewTests(SimpleTestCase):
def test_classbased_technical_404(self):
response = self.client.get('/classbased404/')
self.assertContains(response, "Raised by:", status_code=404)
self.assertContains(response, "view_tests.views.Http404View", status_code=404)
self.assertContains(
response,
'<th>Raised by:</th><td>view_tests.views.Http404View</td>',
status_code=404,
html=True,
)
def test_non_l10ned_numeric_ids(self):
"""