1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #33567 -- Avoided setting default text/html content type on responses.

This commit is contained in:
Claude Paroz
2022-03-08 17:03:04 +01:00
committed by Carlton Gibson
parent 3dbf46654c
commit 93803a1b5f
6 changed files with 11 additions and 14 deletions

View File

@@ -539,7 +539,6 @@ class HttpResponseSubclassesTests(SimpleTestCase):
response = HttpResponseRedirect(
"/redirected/",
content="The resource has temporarily moved",
content_type="text/html",
)
self.assertContains(
response, "The resource has temporarily moved", status_code=302
@@ -592,7 +591,7 @@ class HttpResponseSubclassesTests(SimpleTestCase):
self.assertEqual(response.status_code, 405)
# Standard HttpResponse init args can be used
response = HttpResponseNotAllowed(
["GET"], content="Only the GET method is allowed", content_type="text/html"
["GET"], content="Only the GET method is allowed"
)
self.assertContains(response, "Only the GET method is allowed", status_code=405)