diff options
Diffstat (limited to 'test/test_exceptions.py')
-rw-r--r-- | test/test_exceptions.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/test_exceptions.py b/test/test_exceptions.py index 4190a61..b5bb93e 100644 --- a/test/test_exceptions.py +++ b/test/test_exceptions.py @@ -4,7 +4,7 @@ import pickle from urllib3.exceptions import (HTTPError, MaxRetryError, LocationParseError, ClosedPoolError, EmptyPoolError, HostChangedError, ReadTimeoutError, - ConnectTimeoutError) + ConnectTimeoutError, HeaderParsingError) from urllib3.connectionpool import HTTPConnectionPool @@ -44,3 +44,11 @@ class TestPickle(unittest.TestCase): assert self.verify_pickling( ReadTimeoutError(HTTPConnectionPool('localhost'), '/', None)) + + +class TestFormat(unittest.TestCase): + def test_header_parsing_errors(self): + hpe = HeaderParsingError('defects', 'unparsed_data') + + self.assertTrue('defects' in str(hpe)) + self.assertTrue('unparsed_data' in str(hpe)) |