mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Stricter verification for file based url scheme and reliance on ftp protocol.
This commit is contained in:
parent
0d62f5bbfe
commit
2ef16328e8
2 changed files with 5 additions and 1 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue