projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d38997
)
add test of InvalidURL
author
Skip Montanaro
<skip@pobox.com>
Sun, 24 Mar 2002 16:54:16 +0000
(16:54 +0000)
committer
Skip Montanaro
<skip@pobox.com>
Sun, 24 Mar 2002 16:54:16 +0000
(16:54 +0000)
Lib/test/test_httplib.py
patch
|
blob
|
history
diff --git
a/Lib/test/test_httplib.py
b/Lib/test/test_httplib.py
index d39e85f4153e7ca8bd2accc35280fe62ad92ed26..7860dd3138cfbf91bfc429ff52df3ad2d4ddc4bb 100644
(file)
--- 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"