diff options
author | Tom Carrick <tom@carrick.eu> | 2020-10-07 08:10:35 +0200 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-10-07 09:19:57 +0200 |
commit | 2e7cc95499f758a1c4aa036cbf1dcddf82a89ea2 (patch) | |
tree | 1ed74455bddfb142436eeb3955ecf4f0816d4505 /tests/httpwrappers | |
parent | 07a30f561661efae1691ff45d10ec6014b395b58 (diff) | |
download | django-2e7cc95499f758a1c4aa036cbf1dcddf82a89ea2.tar.gz |
Refs #32002 -- Added tests for HttpResponse's content_type parameter.
Diffstat (limited to 'tests/httpwrappers')
-rw-r--r-- | tests/httpwrappers/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
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): |