MCPcopy
hub / github.com/django/django / test_config_value_as_tuple

Method test_config_value_as_tuple

tests/utils_tests/test_csp.py:59–64  ·  view source on GitHub ↗

Test that a tuple can be passed as a value.

(self)

Source from the content-addressed store, hash-verified

57 self.assertPolicyEqual(build_policy(policy), "default-src 'self'")
58
59 def test_config_value_as_tuple(self):
60 """
61 Test that a tuple can be passed as a value.
62 """
63 policy = {"default-src": (CSP.SELF, "foo.com")}
64 self.assertPolicyEqual(build_policy(policy), "default-src 'self' foo.com")
65
66 def test_config_value_as_set(self):
67 """

Callers

nothing calls this directly

Calls 2

assertPolicyEqualMethod · 0.95
build_policyFunction · 0.90

Tested by

no test coverage detected