Fix closes issue12698 - make the no_proxy environment variable handling a bit lenient (accomodate spaces in between the items)

This commit is contained in:
Senthil Kumaran 2011-08-06 12:24:33 +08:00
parent 0f8acebd53
commit b5bd4c88b5
2 changed files with 5 additions and 1 deletions

View file

@ -114,6 +114,9 @@ class ProxyTests(unittest.TestCase):
proxies = urllib.getproxies_environment()
# getproxies_environment use lowered case truncated (no '_proxy') keys
self.assertEqual('localhost', proxies['no'])
# List of no_proxies with space.
self.env.set('NO_PROXY', 'localhost, anotherdomain.com, newdomain.com')
self.assertTrue(urllib.proxy_bypass_environment('anotherdomain.com'))
class urlopen_HttpTests(unittest.TestCase):