]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add a test for HTTPError.__str__ when it uses httputils. 1647/head
authorJonathan Prates <jonathan.prates@corp.globo.com>
Fri, 19 Feb 2016 18:52:53 +0000 (16:52 -0200)
committerJonathan Prates <jonathan.prates@corp.globo.com>
Fri, 19 Feb 2016 18:52:53 +0000 (16:52 -0200)
tornado/test/web_test.py

index 7ae3d874536729f2b9d86a53d0456923cc843f39..906dcf702b4a39c4e32816ca57437f761be9071f 100644 (file)
@@ -1476,6 +1476,8 @@ class RaiseWithReasonTest(SimpleHandlerTestCase):
     def test_httperror_str(self):
         self.assertEqual(str(HTTPError(682, reason="Foo")), "HTTP 682: Foo")
 
+    def test_httperror_str_from_httputil(self):
+        self.assertEqual(str(HTTPError(682)), "HTTP 682: Unknown")
 
 @wsgi_safe
 class ErrorHandlerXSRFTest(WebTestCase):