add test of InvalidURL

This commit is contained in:
Skip Montanaro 2002-03-24 16:54:16 +00:00
parent 9d38997e8c
commit 03ff86da25

View File

@ -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"