Refs #32002 -- Added tests for HttpResponse's content_type parameter.
This commit is contained in:
parent
07a30f5616
commit
2e7cc95499
|
@ -470,6 +470,10 @@ class HttpResponseTests(unittest.TestCase):
|
||||||
# del doesn't raise a KeyError on nonexistent headers.
|
# del doesn't raise a KeyError on nonexistent headers.
|
||||||
del r.headers['X-Foo']
|
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):
|
class HttpResponseSubclassesTests(SimpleTestCase):
|
||||||
def test_redirect(self):
|
def test_redirect(self):
|
||||||
|
|
Loading…
Reference in New Issue