Fix Issue6631 - Disallow relative file paths in urllib urlopen

This commit is contained in:
Senthil Kumaran 2012-01-21 11:52:48 +08:00
parent 002890861f
commit 3800ea9f65
4 changed files with 9 additions and 0 deletions

View file

@ -125,6 +125,8 @@ class OtherNetworkTests(unittest.TestCase):
finally:
os.remove(TESTFN)
self.assertRaises(ValueError, urllib.request.urlopen,'./relative_path/to/file')
# XXX Following test depends on machine configurations that are internal
# to CNRI. Need to set up a public server with the right authentication
# configuration for test purposes.