diff options
| author | Tim Graham <timograham@gmail.com> | 2017-02-02 20:43:21 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-02-03 08:01:45 -0500 |
| commit | 29f607927fe82e2c8baab171dfa8baf710cd9b83 (patch) | |
| tree | f525c6c4784ccafe77e01f706093fa6f4a5c9481 /tests/flatpages_tests | |
| parent | a21ec12409a5b72d602cd03ee925b6ceb1cd5492 (diff) | |
Fixed spelling of "nonexistent".
Diffstat (limited to 'tests/flatpages_tests')
| -rw-r--r-- | tests/flatpages_tests/test_csrf.py | 10 | ||||
| -rw-r--r-- | tests/flatpages_tests/test_middleware.py | 20 | ||||
| -rw-r--r-- | tests/flatpages_tests/test_views.py | 17 |
3 files changed, 37 insertions, 10 deletions
diff --git a/tests/flatpages_tests/test_csrf.py b/tests/flatpages_tests/test_csrf.py index aa0344a930..ae2dd9755f 100644 --- a/tests/flatpages_tests/test_csrf.py +++ b/tests/flatpages_tests/test_csrf.py @@ -60,7 +60,10 @@ class FlatpageCSRFTests(TestCase): self.assertContains(response, "<p>Isn't it flat!</p>") def test_view_non_existent_flatpage(self): - "A non-existent flatpage raises 404 when served through a view, even when the middleware is in use" + """ + A nonexistent flatpage raises 404 when served through a view, even when + the middleware is in use. + """ response = self.client.get('/flatpage_root/no_such_flatpage/') self.assertEqual(response.status_code, 404) @@ -79,7 +82,10 @@ class FlatpageCSRFTests(TestCase): self.assertContains(response, "<p>Isn't it flat!</p>") def test_fallback_non_existent_flatpage(self): - "A non-existent flatpage raises a 404 when served by the fallback middleware" + """ + A nonexistent flatpage raises a 404 when served by the fallback + middleware. + """ response = self.client.get('/no_such_flatpage/') self.assertEqual(response.status_code, 404) diff --git a/tests/flatpages_tests/test_middleware.py b/tests/flatpages_tests/test_middleware.py index b7ca196db1..22e4c2ba31 100644 --- a/tests/flatpages_tests/test_middleware.py +++ b/tests/flatpages_tests/test_middleware.py @@ -60,7 +60,10 @@ class FlatpageMiddlewareTests(TestDataMixin, TestCase): self.assertContains(response, "<p>Isn't it flat!</p>") def test_view_non_existent_flatpage(self): - "A non-existent flatpage raises 404 when served through a view, even when the middleware is in use" + """ + A nonexistent flatpage raises 404 when served through a view, even when + the middleware is in use. + """ response = self.client.get('/flatpage_root/no_such_flatpage/') self.assertEqual(response.status_code, 404) @@ -79,7 +82,10 @@ class FlatpageMiddlewareTests(TestDataMixin, TestCase): self.assertContains(response, "<p>Isn't it flat!</p>") def test_fallback_non_existent_flatpage(self): - "A non-existent flatpage raises a 404 when served by the fallback middleware" + """ + A nonexistent flatpage raises a 404 when served by the fallback + middleware. + """ response = self.client.get('/no_such_flatpage/') self.assertEqual(response.status_code, 404) @@ -131,7 +137,10 @@ class FlatpageMiddlewareAppendSlashTests(TestDataMixin, TestCase): self.assertRedirects(response, '/flatpage_root/flatpage/', status_code=301) def test_redirect_view_non_existent_flatpage(self): - "A non-existent flatpage raises 404 when served through a view and should not add a slash" + """ + A nonexistent flatpage raises 404 when served through a view and + should not add a slash. + """ response = self.client.get('/flatpage_root/no_such_flatpage') self.assertEqual(response.status_code, 404) @@ -141,7 +150,10 @@ class FlatpageMiddlewareAppendSlashTests(TestDataMixin, TestCase): self.assertRedirects(response, '/flatpage/', status_code=301) def test_redirect_fallback_non_existent_flatpage(self): - "A non-existent flatpage raises a 404 when served by the fallback middleware and should not add a slash" + """ + A nonexistent flatpage raises a 404 when served by the fallback + middleware and should not add a slash. + """ response = self.client.get('/no_such_flatpage') self.assertEqual(response.status_code, 404) diff --git a/tests/flatpages_tests/test_views.py b/tests/flatpages_tests/test_views.py index 42d3e2e8cc..57b05debb4 100644 --- a/tests/flatpages_tests/test_views.py +++ b/tests/flatpages_tests/test_views.py @@ -60,7 +60,7 @@ class FlatpageViewTests(TestDataMixin, TestCase): self.assertContains(response, "<p>Isn't it flat!</p>") def test_view_non_existent_flatpage(self): - "A non-existent flatpage raises 404 when served through a view" + """A nonexistent flatpage raises 404 when served through a view.""" response = self.client.get('/flatpage_root/no_such_flatpage/') self.assertEqual(response.status_code, 404) @@ -79,7 +79,10 @@ class FlatpageViewTests(TestDataMixin, TestCase): self.assertEqual(response.status_code, 404) def test_fallback_non_existent_flatpage(self): - "A non-existent flatpage won't be served if the fallback middleware is disabled" + """ + A nonexistent flatpage won't be served if the fallback middleware is + disabled. + """ response = self.client.get('/no_such_flatpage/') self.assertEqual(response.status_code, 404) @@ -122,7 +125,10 @@ class FlatpageViewAppendSlashTests(TestDataMixin, TestCase): self.assertRedirects(response, '/flatpage_root/flatpage/', status_code=301) def test_redirect_view_non_existent_flatpage(self): - "A non-existent flatpage raises 404 when served through a view and should not add a slash" + """ + A nonexistent flatpage raises 404 when served through a view and + should not add a slash. + """ response = self.client.get('/flatpage_root/no_such_flatpage') self.assertEqual(response.status_code, 404) @@ -132,7 +138,10 @@ class FlatpageViewAppendSlashTests(TestDataMixin, TestCase): self.assertEqual(response.status_code, 404) def test_redirect_fallback_non_existent_flatpage(self): - "A non-existent flatpage won't be served if the fallback middleware is disabled and should not add a slash" + """ + A nonexistent flatpage won't be served if the fallback middleware is + disabled and should not add a slash. + """ response = self.client.get('/no_such_flatpage') self.assertEqual(response.status_code, 404) |
