summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2011-08-06 04:28:16 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2011-08-06 04:28:16 (GMT)
commit0c8108914ef70562f8ce4faaadf130fc9fb75ed2 (patch)
tree8de49e58158f3b753434d4a510b2baa9abcefa0f /Lib/test
parent4dc9c84ed9ad3a22d37abc06e53c450130bba317 (diff)
parent89976f1cdc49c909f808f8bb1ec15ac963acbc93 (diff)
downloadcpython-0c8108914ef70562f8ce4faaadf130fc9fb75ed2.zip
cpython-0c8108914ef70562f8ce4faaadf130fc9fb75ed2.tar.gz
cpython-0c8108914ef70562f8ce4faaadf130fc9fb75ed2.tar.bz2
merge from 3.2 - Fix closes issue12698 - make the no_proxy environment variable handling a bit lenient (accomodate spaces in between the items)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_urllib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 3fcf9a3..7d35f10 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."""