summaryrefslogtreecommitdiff
path: root/tests/responses
diff options
context:
space:
mode:
authorXDEv11 <48050327+XDEv11@users.noreply.github.com>2023-06-11 02:43:05 +0800
committerGitHub <noreply@github.com>2023-06-10 20:43:05 +0200
commit221c27bd6a10155f65c9f93ecc67a61c76befbb7 (patch)
tree8ffa63213044ce202b1d4167fd96833475315f02 /tests/responses
parentcaf80cb41f13e84803a94928282cae75333bbdfc (diff)
Added tests for HttpResponseBase.charset/reason_phrase setters.
Diffstat (limited to 'tests/responses')
-rw-r--r--tests/responses/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/responses/tests.py b/tests/responses/tests.py
index 035dd39174..b16cb53364 100644
--- a/tests/responses/tests.py
+++ b/tests/responses/tests.py
@@ -52,6 +52,16 @@ class HttpResponseBaseTests(SimpleTestCase):
r.setdefault("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):
def test_status_code(self):