mirror of
https://github.com/django/django.git
synced 2025-11-19 11:15:44 +00:00
Refs #15727 -- Captured failed request log in CSPMiddlewareTest.
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
This commit is contained in:
parent
66082a7dac
commit
d454aefbd1
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue