Refs #32002 -- Added tests for HttpResponse's content_type parameter.

This commit is contained in:
Tom Carrick 2020-10-07 08:10:35 +02:00 committed by Mariusz Felisiak
parent 07a30f5616
commit 2e7cc95499
1 changed files with 4 additions and 0 deletions

View File

@ -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):