Fix Issue6631 - Disallow relative files paths in urllib*.open()

This commit is contained in:
Senthil Kumaran 2012-01-21 11:43:02 +08:00
parent 631c258000
commit 58c6062068
3 changed files with 7 additions and 0 deletions

View file

@ -126,6 +126,8 @@ class OtherNetworkTests(unittest.TestCase):
finally:
os.remove(TESTFN)
self.assertRaises(ValueError, urllib2.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.