summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-07-11 03:12:43 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-07-11 03:12:43 (GMT)
commit2ef16328e82ae9b9715251e41b8abf4b95ae6f20 (patch)
tree41c2f9303f4eb6efc9313044b1a54728fc2160c1 /Lib/test
parent0d62f5bbfe1c865165fd1285bb44fa29eb3b8bde (diff)
downloadcpython-2ef16328e82ae9b9715251e41b8abf4b95ae6f20.zip
cpython-2ef16328e82ae9b9715251e41b8abf4b95ae6f20.tar.gz
cpython-2ef16328e82ae9b9715251e41b8abf4b95ae6f20.tar.bz2
Stricter verification for file based url scheme and reliance on ftp protocol.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_urllib2.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 080daa4..4d117c7 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -731,6 +731,8 @@ class HandlerTests(unittest.TestCase):
("file://ftp.example.com///foo.txt", False),
# XXXX bug: fails with OSError, should be URLError
("file://ftp.example.com/foo.txt", False),
+ ("file://somehost//foo/something.txt", True),
+ ("file://localhost//foo/something.txt", False),
]:
req = Request(url)
try:
@@ -741,6 +743,7 @@ class HandlerTests(unittest.TestCase):
else:
self.assertTrue(o.req is req)
self.assertEqual(req.type, "ftp")
+ self.assertEqual(req.type is "ftp", ftp)
def test_http(self):