mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Merged revisions 68249 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r68249 | antoine.pitrou | 2009-01-03 23:55:38 +0100 (sam., 03 janv. 2009) | 3 lines test_urllib would set environment variable NO_PROXY without removing it afterwards. ........
This commit is contained in:
@@ -130,10 +130,14 @@ class ProxyTests(unittest.TestCase):
|
||||
os.environ[k] = v
|
||||
|
||||
def test_getproxies_environment_keep_no_proxies(self):
|
||||
os.environ['NO_PROXY'] = 'localhost'
|
||||
proxies = urllib.request.getproxies_environment()
|
||||
# getproxies_environment use lowered case truncated (no '_proxy') keys
|
||||
self.assertEquals('localhost', proxies['no'])
|
||||
try:
|
||||
os.environ['NO_PROXY'] = 'localhost'
|
||||
proxies = urllib.request.getproxies_environment()
|
||||
# getproxies_environment use lowered case truncated (no '_proxy') keys
|
||||
self.assertEquals('localhost', proxies['no'])
|
||||
finally:
|
||||
# The old value will be restored by tearDown, if applicable.
|
||||
del os.environ['NO_PROXY']
|
||||
|
||||
|
||||
class urlopen_HttpTests(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user