From 221c27bd6a10155f65c9f93ecc67a61c76befbb7 Mon Sep 17 00:00:00 2001 From: XDEv11 <48050327+XDEv11@users.noreply.github.com> Date: Sun, 11 Jun 2023 02:43:05 +0800 Subject: [PATCH] Added tests for HttpResponseBase.charset/reason_phrase setters. --- tests/responses/tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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):