summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib.py
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2012-10-22 16:43:04 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2012-10-22 16:43:04 (GMT)
commit40d8078f418104e8558e72ca71484d8f3df088ce (patch)
tree15df1dbcc062bc733b9c13af75e7568197a25c10 /Lib/test/test_urllib.py
parentefb15993f8c7788958da288cd66cf49b8afdd871 (diff)
downloadcpython-40d8078f418104e8558e72ca71484d8f3df088ce.zip
cpython-40d8078f418104e8558e72ca71484d8f3df088ce.tar.gz
cpython-40d8078f418104e8558e72ca71484d8f3df088ce.tar.bz2
Issue #16301: Fix the localhost verification in urllib/request.py for file://. Modify tests to use localhost for local temp files, which could make Windows Buildbot (#16300) happy
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r--Lib/test/test_urllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 85e54bf..e2d306f 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -277,7 +277,7 @@ Content-Type: text/html; charset=iso-8859-1
def test_file_notexists(self):
fd, tmp_file = tempfile.mkstemp()
- tmp_fileurl = 'file://' + tmp_file
+ tmp_fileurl = 'file://localhost' + tmp_file
self.assertTrue(os.path.exists(tmp_file))
self.assertTrue(urlopen(tmp_fileurl))