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