diff options
| author | Andrey Petrov <andrey.petrov@shazow.net> | 2014-06-24 16:26:44 -0700 |
|---|---|---|
| committer | Andrey Petrov <andrey.petrov@shazow.net> | 2014-06-24 16:26:44 -0700 |
| commit | 95fafd865718bd40e9d554e1396144e56af6fd5e (patch) | |
| tree | 764ae4614c30922b618487804210c662a0fb7ef0 /test/test_poolmanager.py | |
| parent | 26e4ef9084adcce1b0f854f5431ed92519d47fb5 (diff) | |
| download | urllib3-95fafd865718bd40e9d554e1396144e56af6fd5e.tar.gz | |
Handle blank host with new exception, LocationValueError.
Diffstat (limited to 'test/test_poolmanager.py')
| -rw-r--r-- | test/test_poolmanager.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_poolmanager.py b/test/test_poolmanager.py index 759b5e33..754ee8a7 100644 --- a/test/test_poolmanager.py +++ b/test/test_poolmanager.py @@ -4,7 +4,7 @@ from urllib3.poolmanager import PoolManager from urllib3 import connection_from_url from urllib3.exceptions import ( ClosedPoolError, - LocationParseError, + LocationValueError, ) @@ -68,7 +68,8 @@ class TestPoolManager(unittest.TestCase): def test_nohost(self): p = PoolManager(5) - self.assertRaises(LocationParseError, p.connection_from_url, 'http://@') + self.assertRaises(LocationValueError, p.connection_from_url, 'http://@') + self.assertRaises(LocationValueError, p.connection_from_url, None) if __name__ == '__main__': |
