Issue2987 - Added additional Invalid URL and changed the Invalid URL checking code for better.

This commit is contained in:
Senthil Kumaran 2010-04-20 20:37:59 +00:00
parent c166b4021f
commit 241a04371b
2 changed files with 9 additions and 6 deletions

View file

@ -272,6 +272,7 @@ class UrlParseTestCase(unittest.TestCase):
for invalid_url in [
'http://::12.34.56.78]/',
'http://[::1/foo/',
'http://[::1/foo/bad]/bad',
'http://[::ffff:12.34.56.78']:
self.assertRaises(ValueError, lambda : urlparse.urlparse(invalid_url).hostname)
self.assertRaises(ValueError, lambda : urlparse.urlparse(invalid_url))