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

Refs #30400 -- Improved typography in debug and csrf templates.

This commit is contained in:
Jon Dufresne
2020-07-07 16:32:58 -07:00
committed by Mariusz Felisiak
parent 779e615e36
commit 0e6fa65ffd
5 changed files with 10 additions and 10 deletions

View File

@@ -113,13 +113,13 @@ class DebugViewTests(SimpleTestCase):
def test_404(self):
response = self.client.get('/raises404/')
self.assertEqual(response.status_code, 404)
self.assertContains(response, "<code>not-in-urls</code>, didn't match", status_code=404)
self.assertContains(response, '<code>not-in-urls</code>, didnt match', status_code=404)
def test_404_not_in_urls(self):
response = self.client.get('/not-in-urls')
self.assertNotContains(response, "Raised by:", status_code=404)
self.assertContains(response, "Django tried these URL patterns", status_code=404)
self.assertContains(response, "<code>not-in-urls</code>, didn't match", status_code=404)
self.assertContains(response, '<code>not-in-urls</code>, didnt match', status_code=404)
# Pattern and view name of a RegexURLPattern appear.
self.assertContains(response, r"^regex-post/(?P&lt;pk&gt;[0-9]+)/$", status_code=404)
self.assertContains(response, "[name='regex-post']", status_code=404)
@@ -130,7 +130,7 @@ class DebugViewTests(SimpleTestCase):
@override_settings(ROOT_URLCONF=WithoutEmptyPathUrls)
def test_404_empty_path_not_in_urls(self):
response = self.client.get('/')
self.assertContains(response, "The empty path didn't match any of these.", status_code=404)
self.assertContains(response, 'The empty path didnt match any of these.', status_code=404)
def test_technical_404(self):
response = self.client.get('/technical404/')