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/requests | |
| parent | 4bb70cbcc60794f515c9bfefeca87b8272d33c0c (diff) | |
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
Diffstat (limited to 'tests/requests')
| -rw-r--r-- | tests/requests/tests.py | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/tests/requests/tests.py b/tests/requests/tests.py index 2581eada0b..4989071cbb 100644 --- a/tests/requests/tests.py +++ b/tests/requests/tests.py @@ -95,9 +95,8 @@ class RequestsTests(SimpleTestCase): def test_wsgirequest_with_script_name(self): """ - Ensure that the request's path is correctly assembled, regardless of - whether or not the SCRIPT_NAME has a trailing slash. - Refs #20169. + The request's path is correctly assembled, regardless of whether or + not the SCRIPT_NAME has a trailing slash (#20169). """ # With trailing slash request = WSGIRequest({ @@ -120,8 +119,7 @@ class RequestsTests(SimpleTestCase): """ WSGI squashes multiple successive slashes in PATH_INFO, WSGIRequest should take that into account when populating request.path and - request.META['SCRIPT_NAME']. - Refs #17133. + request.META['SCRIPT_NAME'] (#17133). """ request = WSGIRequest({ 'SCRIPT_URL': '/mst/milestones//accounts/login//help', @@ -134,9 +132,8 @@ class RequestsTests(SimpleTestCase): def test_wsgirequest_with_force_script_name(self): """ - Ensure that the FORCE_SCRIPT_NAME setting takes precedence over the - request's SCRIPT_NAME environment parameter. - Refs #20169. + The FORCE_SCRIPT_NAME setting takes precedence over the request's + SCRIPT_NAME environment parameter (#20169). """ with override_settings(FORCE_SCRIPT_NAME='/FORCED_PREFIX/'): request = WSGIRequest({ @@ -149,9 +146,8 @@ class RequestsTests(SimpleTestCase): def test_wsgirequest_path_with_force_script_name_trailing_slash(self): """ - Ensure that the request's path is correctly assembled, regardless of - whether or not the FORCE_SCRIPT_NAME setting has a trailing slash. - Refs #20169. + The request's path is correctly assembled, regardless of whether or not + the FORCE_SCRIPT_NAME setting has a trailing slash (#20169). """ # With trailing slash with override_settings(FORCE_SCRIPT_NAME='/FORCED_PREFIX/'): @@ -250,7 +246,7 @@ class RequestsTests(SimpleTestCase): datetime_cookie = response.cookies['datetime'] self.assertIn( datetime_cookie['expires'], - # Slight time dependency; refs #23450 + # assertIn accounts for slight time dependency (#23450) ('Sat, 01-Jan-2028 04:05:06 GMT', 'Sat, 01-Jan-2028 04:05:07 GMT') ) @@ -847,8 +843,8 @@ class BuildAbsoluteURITestCase(SimpleTestCase): def test_build_absolute_uri_no_location(self): """ - Ensures that ``request.build_absolute_uri()`` returns the proper value - when the ``location`` argument is not provided, and ``request.path`` + ``request.build_absolute_uri()`` returns the proper value when + the ``location`` argument is not provided, and ``request.path`` begins with //. """ # //// is needed to create a request with a path beginning with // @@ -860,9 +856,9 @@ class BuildAbsoluteURITestCase(SimpleTestCase): def test_build_absolute_uri_absolute_location(self): """ - Ensures that ``request.build_absolute_uri()`` returns the proper value - when an absolute URL ``location`` argument is provided, and - ``request.path`` begins with //. + ``request.build_absolute_uri()`` returns the proper value when + an absolute URL ``location`` argument is provided, and ``request.path`` + begins with //. """ # //// is needed to create a request with a path beginning with // request = self.factory.get('////absolute-uri') @@ -873,8 +869,8 @@ class BuildAbsoluteURITestCase(SimpleTestCase): def test_build_absolute_uri_schema_relative_location(self): """ - Ensures that ``request.build_absolute_uri()`` returns the proper value - when a schema-relative URL ``location`` argument is provided, and + ``request.build_absolute_uri()`` returns the proper value when + a schema-relative URL ``location`` argument is provided, and ``request.path`` begins with //. """ # //// is needed to create a request with a path beginning with // @@ -886,9 +882,9 @@ class BuildAbsoluteURITestCase(SimpleTestCase): def test_build_absolute_uri_relative_location(self): """ - Ensures that ``request.build_absolute_uri()`` returns the proper value - when a relative URL ``location`` argument is provided, and - ``request.path`` begins with //. + ``request.build_absolute_uri()`` returns the proper value when + a relative URL ``location`` argument is provided, and ``request.path`` + begins with //. """ # //// is needed to create a request with a path beginning with // request = self.factory.get('////absolute-uri') |
