mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Refs #15727 -- Captured failed request log in CSPMiddlewareTest.
This commit is contained in:
@@ -100,7 +100,8 @@ class CSPMiddlewareTest(SimpleTestCase):
|
|||||||
"""
|
"""
|
||||||
Test that the CSP headers are not added to the debug view.
|
Test that the CSP headers are not added to the debug view.
|
||||||
"""
|
"""
|
||||||
response = self.client.get("/csp-500/")
|
with self.assertLogs("django.request", "WARNING"):
|
||||||
|
response = self.client.get("/csp-500/")
|
||||||
self.assertNotIn(CSP.HEADER_ENFORCE, response)
|
self.assertNotIn(CSP.HEADER_ENFORCE, response)
|
||||||
self.assertNotIn(CSP.HEADER_REPORT_ONLY, response)
|
self.assertNotIn(CSP.HEADER_REPORT_ONLY, response)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user