Test that `None` removes the directive from the policy. Useful in cases where the CSP config is scripted in some way or explicitly not wanting to set a directive.
(self)
| 77 | ) |
| 78 | |
| 79 | def test_config_value_none(self): |
| 80 | """ |
| 81 | Test that `None` removes the directive from the policy. |
| 82 | |
| 83 | Useful in cases where the CSP config is scripted in some way or |
| 84 | explicitly not wanting to set a directive. |
| 85 | """ |
| 86 | policy = {"default-src": [CSP.SELF], "script-src": None} |
| 87 | self.assertPolicyEqual(build_policy(policy), basic_policy) |
| 88 | |
| 89 | def test_config_value_boolean_true(self): |
| 90 | policy = {"default-src": [CSP.SELF], "block-all-mixed-content": True} |
nothing calls this directly
no test coverage detected