mirror of
https://github.com/django/django.git
synced 2025-08-01 09:32:50 +00:00
Fixed #24137 -- Switched to HTTP reason phrases from Python stdlib.
This commit is contained in:
parent
0f3ea8c0bc
commit
24b2bc635e
5 changed files with 26 additions and 72 deletions
|
@ -50,9 +50,9 @@ class HttpResponseBaseTests(SimpleTestCase):
|
|||
|
||||
class HttpResponseTests(SimpleTestCase):
|
||||
def test_status_code(self):
|
||||
resp = HttpResponse(status=418)
|
||||
self.assertEqual(resp.status_code, 418)
|
||||
self.assertEqual(resp.reason_phrase, "I'M A TEAPOT")
|
||||
resp = HttpResponse(status=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."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue