From: Jonathan Prates Date: Fri, 19 Feb 2016 18:52:53 +0000 (-0200) Subject: Add a test for HTTPError.__str__ when it uses httputils. X-Git-Tag: v4.4.0b1~45^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1647%2Fhead;p=thirdparty%2Ftornado.git Add a test for HTTPError.__str__ when it uses httputils. --- diff --git a/tornado/test/web_test.py b/tornado/test/web_test.py index 7ae3d8745..906dcf702 100644 --- a/tornado/test/web_test.py +++ b/tornado/test/web_test.py @@ -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):