From 2e7cc95499f758a1c4aa036cbf1dcddf82a89ea2 Mon Sep 17 00:00:00 2001 From: Tom Carrick Date: Wed, 7 Oct 2020 08:10:35 +0200 Subject: [PATCH] Refs #32002 -- Added tests for HttpResponse's content_type parameter. --- tests/httpwrappers/tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py index 3c648f6b31..fbc5019979 100644 --- a/tests/httpwrappers/tests.py +++ b/tests/httpwrappers/tests.py @@ -470,6 +470,10 @@ class HttpResponseTests(unittest.TestCase): # del doesn't raise a KeyError on nonexistent headers. del r.headers['X-Foo'] + def test_content_type(self): + r = HttpResponse('hello', content_type='application/json') + self.assertEqual(r.headers['Content-Type'], 'application/json') + class HttpResponseSubclassesTests(SimpleTestCase): def test_redirect(self):