summaryrefslogtreecommitdiff
path: root/tests/responses
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2022-03-08 17:03:04 +0100
committerCarlton Gibson <carlton@noumenal.es>2022-03-09 14:50:52 +0100
commit93803a1b5f4a08eb064b4cc8b3834ff323be4065 (patch)
tree66144520fc2d82e8ce105022ae77341f6aaa83d0 /tests/responses
parent3dbf46654c4017bf1336b32e76f0efa32fad07ca (diff)
downloaddjango-93803a1b5f4a08eb064b4cc8b3834ff323be4065.tar.gz
Fixed #33567 -- Avoided setting default text/html content type on responses.
Diffstat (limited to 'tests/responses')
-rw-r--r--tests/responses/test_fileresponse.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/responses/test_fileresponse.py b/tests/responses/test_fileresponse.py
index ebb7876be2..af90b1170d 100644
--- a/tests/responses/test_fileresponse.py
+++ b/tests/responses/test_fileresponse.py
@@ -101,8 +101,10 @@ class FileResponseTests(SimpleTestCase):
self.assertEqual(response.headers["Content-Type"], "video/webm")
def test_content_type_buffer_explicit_default(self):
- response = FileResponse(io.BytesIO(b"binary content"), content_type="text/html")
- self.assertEqual(response.headers["Content-Type"], "text/html")
+ response = FileResponse(
+ io.BytesIO(b"binary content"), content_type="text/html; charset=utf-8"
+ )
+ self.assertEqual(response.headers["Content-Type"], "text/html; charset=utf-8")
def test_content_type_buffer_named(self):
test_tuples = (