mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Added tests for HttpResponseBase.charset/reason_phrase setters.
This commit is contained in:
parent
caf80cb41f
commit
221c27bd6a
@ -52,6 +52,16 @@ class HttpResponseBaseTests(SimpleTestCase):
|
|||||||
r.setdefault("x-header", "DefaultValue")
|
r.setdefault("x-header", "DefaultValue")
|
||||||
self.assertEqual(r.headers["X-Header"], "DefaultValue")
|
self.assertEqual(r.headers["X-Header"], "DefaultValue")
|
||||||
|
|
||||||
|
def test_charset_setter(self):
|
||||||
|
r = HttpResponseBase()
|
||||||
|
r.charset = "utf-8"
|
||||||
|
self.assertEqual(r.charset, "utf-8")
|
||||||
|
|
||||||
|
def test_reason_phrase_setter(self):
|
||||||
|
r = HttpResponseBase()
|
||||||
|
r.reason_phrase = "test"
|
||||||
|
self.assertEqual(r.reason_phrase, "test")
|
||||||
|
|
||||||
|
|
||||||
class HttpResponseTests(SimpleTestCase):
|
class HttpResponseTests(SimpleTestCase):
|
||||||
def test_status_code(self):
|
def test_status_code(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user