diff options
author | David D Lowe <daviddlowe.flimm@gmail.com> | 2017-06-01 17:39:49 +0100 |
---|---|---|
committer | David D Lowe <daviddlowe.flimm@gmail.com> | 2017-06-01 17:42:26 +0100 |
commit | 47658568a14536fa106450adb294135f1b465973 (patch) | |
tree | 25a3b4f6b8716a89996c67151efd818e7c3d9ba2 | |
parent | d9d926008336ee6393a85f1754e2c47eed6d36d1 (diff) | |
download | waitress-47658568a14536fa106450adb294135f1b465973.tar.gz |
Make test pass in Python 2
-rw-r--r-- | waitress/tests/test_parser.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/waitress/tests/test_parser.py b/waitress/tests/test_parser.py index a1aa7a8..a01356f 100644 --- a/waitress/tests/test_parser.py +++ b/waitress/tests/test_parser.py @@ -252,7 +252,12 @@ class Test_split_uri(unittest.TestCase): def test_split_uri_unicode_error_raises_parsing_error(self): # See https://github.com/Pylons/waitress/issues/64 from waitress.parser import ParsingError - self.assertRaises(ParsingError, self._callFUT, b'/\xd0') + # Either pass or throw a ParsingError, just don't throw another type of + # exception as that will cause the connection to close badly: + try: + self._callFUT(b'/\xd0') + except ParsingError: + pass class Test_get_header_lines(unittest.TestCase): |