summaryrefslogtreecommitdiff
path: root/tests/middleware
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2025-07-22 20:41:41 -0700
committernessita <124304+nessita@users.noreply.github.com>2025-07-23 20:17:55 -0300
commit69a93a88edb56ba47f624dac7a21aacc47ea474f (patch)
treef57507a4435d032493cae40e06ecb254790b67b2 /tests/middleware
parent55b0cc21310b76ce4018dd793ba50556eaf0af06 (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/middleware')
-rw-r--r--tests/middleware/test_csp.py3
-rw-r--r--tests/middleware/test_security.py6
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/middleware/test_csp.py b/tests/middleware/test_csp.py
index de55f0c6a0..c3321b76a5 100644
--- a/tests/middleware/test_csp.py
+++ b/tests/middleware/test_csp.py
@@ -47,7 +47,8 @@ class CSPMiddlewareTest(SimpleTestCase):
@override_settings(SECURE_CSP={"default-src": [CSP.SELF, CSP.NONCE]})
def test_csp_basic_with_nonce_but_unused(self):
"""
- Test if `request.csp_nonce` is never accessed, it is not added to the header.
+ Test if `request.csp_nonce` is never accessed, it is not added to the
+ header.
"""
response = self.client.get("/csp-base/")
nonce = response.text
diff --git a/tests/middleware/test_security.py b/tests/middleware/test_security.py
index 339b9181c3..142f1311ae 100644
--- a/tests/middleware/test_security.py
+++ b/tests/middleware/test_security.py
@@ -130,9 +130,9 @@ class SecurityMiddlewareTest(SimpleTestCase):
def test_sts_subdomains_and_preload(self):
"""
With SECURE_HSTS_SECONDS non-zero, SECURE_HSTS_INCLUDE_SUBDOMAINS and
- SECURE_HSTS_PRELOAD True, the middleware adds a "Strict-Transport-Security"
- header containing both the "includeSubDomains" and "preload" directives
- to the response.
+ SECURE_HSTS_PRELOAD True, the middleware adds a
+ "Strict-Transport-Security" header containing both the
+ "includeSubDomains" and "preload" directives to the response.
"""
response = self.process_response(secure=True)
self.assertEqual(