diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2011-08-06 04:27:40 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2011-08-06 04:27:40 (GMT) |
commit | 89976f1cdc49c909f808f8bb1ec15ac963acbc93 (patch) | |
tree | 54aa2cfad37964a43a6b2733cc224cc8131f477f /Lib/test/test_urllib.py | |
parent | e5cad23a92c88440e739589430c0b22d41a44621 (diff) | |
download | cpython-89976f1cdc49c909f808f8bb1ec15ac963acbc93.zip cpython-89976f1cdc49c909f808f8bb1ec15ac963acbc93.tar.gz cpython-89976f1cdc49c909f808f8bb1ec15ac963acbc93.tar.bz2 |
Fix closes issue12698 - make the no_proxy environment variable handling a bit lenient (accomodate spaces in between the items)
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r-- | Lib/test/test_urllib.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 3a806bf..ac02374 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -135,7 +135,9 @@ class ProxyTests(unittest.TestCase): proxies = urllib.request.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.request.proxy_bypass_environment('anotherdomain.com')) class urlopen_HttpTests(unittest.TestCase): """Test urlopen() opening a fake http connection.""" |