summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_csp.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils_tests/test_csp.py')
-rw-r--r--tests/utils_tests/test_csp.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/utils_tests/test_csp.py b/tests/utils_tests/test_csp.py
index 96c66538d0..86682544e2 100644
--- a/tests/utils_tests/test_csp.py
+++ b/tests/utils_tests/test_csp.py
@@ -67,8 +67,9 @@ class CSPBuildPolicyTest(SimpleTestCase):
"""
Test that a set can be passed as a value.
- Sets are often used in Django settings to ensure uniqueness, however, sets are
- unordered. The middleware ensures consistency via sorting if a set is passed.
+ Sets are often used in Django settings to ensure uniqueness, however,
+ sets are unordered. The middleware ensures consistency via sorting if a
+ set is passed.
"""
policy = {"default-src": {CSP.SELF, "foo.com", "bar.com"}}
self.assertPolicyEqual(
@@ -147,7 +148,8 @@ class LazyNonceTests(SimpleTestCase):
return result
with patch("django.utils.csp.secrets.token_urlsafe", memento_token_urlsafe):
- # Force usage, similar to template rendering, to generate the nonce.
+ # Force usage, similar to template rendering, to generate the
+ # nonce.
val = str(nonce)
self.assertTrue(nonce)