diff options
| author | django-bot <ops@djangoproject.com> | 2025-07-22 20:41:41 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-23 20:17:55 -0300 |
| commit | 69a93a88edb56ba47f624dac7a21aacc47ea474f (patch) | |
| tree | f57507a4435d032493cae40e06ecb254790b67b2 /tests/csrf_tests/tests.py | |
| parent | 55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff) | |
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
Diffstat (limited to 'tests/csrf_tests/tests.py')
| -rw-r--r-- | tests/csrf_tests/tests.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/csrf_tests/tests.py b/tests/csrf_tests/tests.py index 765d950b85..91b1046159 100644 --- a/tests/csrf_tests/tests.py +++ b/tests/csrf_tests/tests.py @@ -441,7 +441,8 @@ class CsrfViewMiddlewareTestMixin(CsrfFunctionTestMixin): def test_process_request_csrf_cookie_and_token(self): """ - If both a cookie and a token is present, the middleware lets it through. + If both a cookie and a token is present, the middleware lets it + through. """ req = self._get_POST_request_with_token() mw = CsrfViewMiddleware(post_form_view) @@ -718,14 +719,16 @@ class CsrfViewMiddlewareTestMixin(CsrfFunctionTestMixin): self.assertContains(response, malformed_referer_msg, status_code=403) # missing scheme # >>> urlsplit('//example.com/') - # SplitResult(scheme='', netloc='example.com', path='/', query='', fragment='') + # SplitResult(scheme='', netloc='example.com', path='/', query='', + # fragment='') req.META["HTTP_REFERER"] = "//example.com/" self._check_referer_rejects(mw, req) response = mw.process_view(req, post_form_view, (), {}) self.assertContains(response, malformed_referer_msg, status_code=403) # missing netloc # >>> urlsplit('https://') - # SplitResult(scheme='https', netloc='', path='', query='', fragment='') + # SplitResult(scheme='https', netloc='', path='', query='', + # fragment='') req.META["HTTP_REFERER"] = "https://" self._check_referer_rejects(mw, req) response = mw.process_view(req, post_form_view, (), {}) |
