diff options
Diffstat (limited to 'tests/responses')
-rw-r--r-- | tests/responses/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/responses/tests.py b/tests/responses/tests.py index bf7a0e12ef..91ec710c72 100644 --- a/tests/responses/tests.py +++ b/tests/responses/tests.py @@ -54,6 +54,12 @@ class HttpResponseTests(SimpleTestCase): self.assertEqual(resp.status_code, 503) self.assertEqual(resp.reason_phrase, "Service Unavailable") + def test_change_status_code(self): + resp = HttpResponse() + resp.status_code = 503 + self.assertEqual(resp.status_code, 503) + self.assertEqual(resp.reason_phrase, "Service Unavailable") + def test_reason_phrase(self): reason = "I'm an anarchist coffee pot on crack." resp = HttpResponse(status=814, reason=reason) |