summaryrefslogtreecommitdiff
path: root/tests/csrf_tests/test_context_processor.py
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2022-02-03 20:24:19 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-07 20:37:05 +0100
commit9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch)
treef0506b668a013d0063e5fba3dbf4863b466713ba /tests/csrf_tests/test_context_processor.py
parentf68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff)
Refs #33476 -- Reformatted code with Black.
Diffstat (limited to 'tests/csrf_tests/test_context_processor.py')
-rw-r--r--tests/csrf_tests/test_context_processor.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/csrf_tests/test_context_processor.py b/tests/csrf_tests/test_context_processor.py
index 26a2b7aedb..903237d68f 100644
--- a/tests/csrf_tests/test_context_processor.py
+++ b/tests/csrf_tests/test_context_processor.py
@@ -6,10 +6,9 @@ from .tests import CsrfFunctionTestMixin
class TestContextProcessor(CsrfFunctionTestMixin, SimpleTestCase):
-
def test_force_token_to_string(self):
request = HttpRequest()
- test_secret = 32 * 'a'
- request.META['CSRF_COOKIE'] = test_secret
- token = csrf(request).get('csrf_token')
+ test_secret = 32 * "a"
+ request.META["CSRF_COOKIE"] = test_secret
+ token = csrf(request).get("csrf_token")
self.assertMaskedSecretCorrect(token, test_secret)