diff options
| author | Claude Paroz <claude@2xlibre.net> | 2022-03-08 17:03:04 +0100 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2022-03-09 14:50:52 +0100 |
| commit | 93803a1b5f4a08eb064b4cc8b3834ff323be4065 (patch) | |
| tree | 66144520fc2d82e8ce105022ae77341f6aaa83d0 /tests/csrf_tests | |
| parent | 3dbf46654c4017bf1336b32e76f0efa32fad07ca (diff) | |
Fixed #33567 -- Avoided setting default text/html content type on responses.
Diffstat (limited to 'tests/csrf_tests')
| -rw-r--r-- | tests/csrf_tests/tests.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/csrf_tests/tests.py b/tests/csrf_tests/tests.py index 834a92eecf..6db67c9190 100644 --- a/tests/csrf_tests/tests.py +++ b/tests/csrf_tests/tests.py @@ -375,6 +375,7 @@ class CsrfViewMiddlewareTestMixin(CsrfFunctionTestMixin): with self.assertLogs("django.security.csrf", "WARNING") as cm: resp = mw.process_view(req, post_form_view, (), {}) self.assertEqual(403, resp.status_code) + self.assertEqual(resp["Content-Type"], "text/html; charset=utf-8") self.assertEqual(cm.records[0].getMessage(), "Forbidden (%s): " % expected) def test_csrf_cookie_bad_or_missing_token(self): |
