MCPcopy
hub / github.com/django/django / test_config_with_nonce

Method test_config_with_nonce

tests/utils_tests/test_csp.py:117–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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]}
119 self.assertPolicyEqual(
120 build_policy(policy, nonce="abc123"),
121 "default-src 'self' 'nonce-abc123'",
122 )
123
124 def test_config_with_multiple_nonces(self):
125 policy = {

Callers

nothing calls this directly

Calls 2

assertPolicyEqualMethod · 0.95
build_policyFunction · 0.90

Tested by

no test coverage detected