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/test_client_regress | |
| parent | 4bb70cbcc60794f515c9bfefeca87b8272d33c0c (diff) | |
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
Diffstat (limited to 'tests/test_client_regress')
| -rw-r--r-- | tests/test_client_regress/tests.py | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/tests/test_client_regress/tests.py b/tests/test_client_regress/tests.py index c45afc1244..7c4c8cde24 100644 --- a/tests/test_client_regress/tests.py +++ b/tests/test_client_regress/tests.py @@ -167,16 +167,15 @@ class AssertContainsTests(SimpleTestCase): self.assertNotContains(r, ugettext_lazy('never')) def test_assert_contains_renders_template_response(self): - """ Test that we can pass in an unrendered SimpleTemplateResponse - without throwing an error. - Refs #15826. + """ + An unrendered SimpleTemplateResponse may be used in assertContains(). """ template = engines['django'].from_string('Hello') response = SimpleTemplateResponse(template) self.assertContains(response, 'Hello') def test_assert_contains_using_non_template_response(self): - """ Test that auto-rendering does not affect responses that aren't + """ auto-rendering does not affect responses that aren't instances (or subclasses) of SimpleTemplateResponse. Refs #15826. """ @@ -184,18 +183,17 @@ class AssertContainsTests(SimpleTestCase): self.assertContains(response, 'Hello') def test_assert_not_contains_renders_template_response(self): - """ Test that we can pass in an unrendered SimpleTemplateResponse - without throwing an error. - Refs #15826. + """ + An unrendered SimpleTemplateResponse may be used in assertNotContains(). """ template = engines['django'].from_string('Hello') response = SimpleTemplateResponse(template) self.assertNotContains(response, 'Bye') def test_assert_not_contains_using_non_template_response(self): - """ Test that auto-rendering does not affect responses that aren't - instances (or subclasses) of SimpleTemplateResponse. - Refs #15826. + """ + auto-rendering does not affect responses that aren't instances (or + subclasses) of SimpleTemplateResponse. """ response = HttpResponse('Hello') self.assertNotContains(response, 'Bye') @@ -208,7 +206,7 @@ class AssertTemplateUsedTests(TestDataMixin, TestCase): "Template usage assertions work then templates aren't in use" response = self.client.get('/no_template_view/') - # Check that the no template case doesn't mess with the template assertions + # The no template case doesn't mess with the template assertions self.assertTemplateNotUsed(response, 'GET Template') try: @@ -519,7 +517,7 @@ class AssertRedirectsTests(SimpleTestCase): @ignore_warnings(category=RemovedInDjango20Warning) def test_full_path_in_expected_urls(self): """ - Test that specifying a full URL as assertRedirects expected_url still + Specifying a full URL as assertRedirects expected_url still work as backwards compatible behavior until Django 2.0. """ response = self.client.get('/redirect_view/') @@ -631,8 +629,8 @@ class AssertFormErrorTests(SimpleTestCase): def test_unknown_nonfield_error(self): """ - Checks that an assertion is raised if the form's non field errors - doesn't contain the provided error. + An assertion is raised if the form's non field errors doesn't contain + the provided error. """ post_data = { 'text': 'Hello World', @@ -806,7 +804,7 @@ class AssertFormsetErrorTests(SimpleTestCase): class LoginTests(TestDataMixin, TestCase): def test_login_different_client(self): - "Check that using a different test client doesn't violate authentication" + "Using a different test client doesn't violate authentication" # Create a second client, and log in. c = Client() @@ -817,8 +815,7 @@ class LoginTests(TestDataMixin, TestCase): response = c.get("/login_protected_redirect_view/") # At this points, the self.client isn't logged in. - # Check that assertRedirects uses the original client, not the - # default client. + # assertRedirects uses the original client, not the default client. self.assertRedirects(response, "/get_view/") @@ -1004,7 +1001,7 @@ class SessionTests(TestDataMixin, TestCase): self.assertEqual(response.status_code, 200) self.assertEqual(response.content, b'set_session') - # Check that the session has been modified + # The session has been modified response = self.client.get('/check_session/') self.assertEqual(response.status_code, 200) self.assertEqual(response.content, b'YES') @@ -1223,9 +1220,8 @@ class RequestMethodStringDataTests(SimpleTestCase): class QueryStringTests(SimpleTestCase): def test_get_like_requests(self): - # See: https://code.djangoproject.com/ticket/10571. for method_name in ('get', 'head'): - # A GET-like request can pass a query string as data + # A GET-like request can pass a query string as data (#10571) method = getattr(self.client, method_name) response = method("/request_data/", data={'foo': 'whiz'}) self.assertEqual(response.context['get-foo'], 'whiz') @@ -1344,8 +1340,8 @@ class RequestHeadersTest(SimpleTestCase): @override_settings(ROOT_URLCONF='test_client_regress.urls') class ReadLimitedStreamTest(SimpleTestCase): """ - Tests that ensure that HttpRequest.body, HttpRequest.read() and - HttpRequest.read(BUFFER) have proper LimitedStream behavior. + HttpRequest.body, HttpRequest.read(), and HttpRequest.read(BUFFER) have + proper LimitedStream behavior. Refs #14753, #15785 """ |
