From cfde30d4e9c9c84c6bc519641fcca2290f218999 Mon Sep 17 00:00:00 2001 From: Jonathan Prates Date: Fri, 19 Feb 2016 16:52:53 -0200 Subject: [PATCH] Add a test for HTTPError.__str__ when it uses httputils. --- tornado/test/web_test.py | 2 ++ 1 file changed, 2 insertions(+) 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): -- 2.47.2