diff options
author | Skip Montanaro <skip@pobox.com> | 2002-03-24 16:54:16 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2002-03-24 16:54:16 (GMT) |
commit | 03ff86da2543bbbad7753c930f8af7f2a783ad4d (patch) | |
tree | 2a7f7d697dd127fe075ead47e9d09489ef850831 /Lib | |
parent | 9d38997e8c4d06ec5717276590a3f1c6a88d2bb7 (diff) | |
download | cpython-03ff86da2543bbbad7753c930f8af7f2a783ad4d.zip cpython-03ff86da2543bbbad7753c930f8af7f2a783ad4d.tar.gz cpython-03ff86da2543bbbad7753c930f8af7f2a783ad4d.tar.bz2 |
add test of InvalidURL
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_httplib.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index d39e85f..7860dd3 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -29,3 +29,13 @@ except httplib.BadStatusLine: print "BadStatusLine raised as expected" else: print "Expect BadStatusLine" + +# Check invalid host_port + +for hp in ("www.python.org:abc", "www.python.org:"): + try: + h = httplib.HTTP(hp) + except httplib.InvalidURL: + print "InvalidURL raised as expected" + else: + print "Expect InvalidURL" |