mirror of
https://github.com/quantum5/django-csp-advanced.git
synced 2025-04-24 11:22:00 -04:00
Avoid dictionary ordering issues.
This commit is contained in:
parent
3b713bcc90
commit
a517182664
|
@ -218,8 +218,8 @@ class TestMiddleware(SimpleTestCase):
|
|||
response = HttpResponse()
|
||||
response.csp = {'style-src': ['https://dmoj.ca']}
|
||||
return response
|
||||
self.assertEqual(view(self.get_request())['Content-Security-Policy'],
|
||||
"script-src 'self'; style-src https://dmoj.ca")
|
||||
self.assertEqual(sorted(view(self.get_request())['Content-Security-Policy'].split('; ')),
|
||||
["script-src 'self'", 'style-src https://dmoj.ca'])
|
||||
|
||||
@override_settings(ADVANCED_CSP={'script-src': ['self']})
|
||||
def test_override_csp_explicit(self):
|
||||
|
|
Loading…
Reference in a new issue