mirror of
https://github.com/django/django.git
synced 2025-09-10 11:09:12 +00:00
Refs #15727 -- Captured failed request log in CSPMiddlewareTest.
This commit is contained in:
parent
66082a7dac
commit
d454aefbd1
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user