diff options
| author | za <za@python.or.id> | 2016-10-27 14:53:39 +0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-10 21:30:21 -0500 |
| commit | 321e94fa41b121f65c02119c02098df327bbd569 (patch) | |
| tree | ce5476c191d589aca4b124f841dfbccac8dd299f /tests/servers/tests.py | |
| parent | 4bb70cbcc60794f515c9bfefeca87b8272d33c0c (diff) | |
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
Diffstat (limited to 'tests/servers/tests.py')
| -rw-r--r-- | tests/servers/tests.py | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/tests/servers/tests.py b/tests/servers/tests.py index 3d959b4b23..03e05d0957 100644 --- a/tests/servers/tests.py +++ b/tests/servers/tests.py @@ -57,33 +57,21 @@ class LiveServerAddress(LiveServerBase): class LiveServerViews(LiveServerBase): def test_404(self): - """ - Ensure that the LiveServerTestCase serves 404s. - Refs #2879. - """ with self.assertRaises(HTTPError) as err: self.urlopen('/') self.assertEqual(err.exception.code, 404, 'Expected 404 response') def test_view(self): - """ - Ensure that the LiveServerTestCase serves views. - Refs #2879. - """ with contextlib.closing(self.urlopen('/example_view/')) as f: self.assertEqual(f.read(), b'example view') def test_static_files(self): - """ - Ensure that the LiveServerTestCase serves static files. - Refs #2879. - """ with contextlib.closing(self.urlopen('/static/example_static_file.txt')) as f: self.assertEqual(f.read().rstrip(b'\r\n'), b'example static file') def test_no_collectstatic_emulation(self): """ - Test that LiveServerTestCase reports a 404 status code when HTTP client + LiveServerTestCase reports a 404 status code when HTTP client tries to access a static file that isn't explicitly put under STATIC_ROOT. """ @@ -92,10 +80,6 @@ class LiveServerViews(LiveServerBase): self.assertEqual(err.exception.code, 404, 'Expected 404 response') def test_media_files(self): - """ - Ensure that the LiveServerTestCase serves media files. - Refs #2879. - """ with contextlib.closing(self.urlopen('/media/example_media_file.txt')) as f: self.assertEqual(f.read().rstrip(b'\r\n'), b'example media file') @@ -108,17 +92,14 @@ class LiveServerDatabase(LiveServerBase): def test_fixtures_loaded(self): """ - Ensure that fixtures are properly loaded and visible to the - live server thread. - Refs #2879. + Fixtures are properly loaded and visible to the live server thread. """ with contextlib.closing(self.urlopen('/model_view/')) as f: self.assertEqual(f.read().splitlines(), [b'jane', b'robert']) def test_database_writes(self): """ - Ensure that data written to the database by a view can be read. - Refs #2879. + Data written to the database by a view can be read. """ self.urlopen('/create_model_instance/') self.assertQuerysetEqual( |
