MCPcopy
hub / github.com/django/django / test_config_with_nonce_arg

Method test_config_with_nonce_arg

tests/utils_tests/test_csp.py:110–115  ·  view source on GitHub ↗

Test when the `CSP.NONCE` is not in the defined policy, the nonce argument has no effect.

(self)

Source from the content-addressed store, hash-verified

108 )
109
110 def test_config_with_nonce_arg(self):
111 """
112 Test when the `CSP.NONCE` is not in the defined policy, the nonce
113 argument has no effect.
114 """
115 self.assertPolicyEqual(build_policy(basic_config, nonce="abc123"), basic_policy)
116
117 def test_config_with_nonce(self):
118 policy = {"default-src": [CSP.SELF, CSP.NONCE]}

Callers

nothing calls this directly

Calls 2

assertPolicyEqualMethod · 0.95
build_policyFunction · 0.90

Tested by

no test coverage detected