diff options
| author | Benjamin Peterson <benjamin@python.org> | 2013-01-01 03:40:42 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2013-01-01 03:40:42 (GMT) |
| commit | 1f7df8f2070391f28391e3594580c07e11b6b32b (patch) | |
| tree | ec03dfe4f71df3840232731145b8f6736fc6a314 /Lib/test/test_urllib2_localnet.py | |
| parent | b25d611f8d9140e83acbfffb6b0579939c88c033 (diff) | |
| parent | 10e93a6d40502e100c68090730e0b3190df97854 (diff) | |
| download | cpython-1f7df8f2070391f28391e3594580c07e11b6b32b.zip cpython-1f7df8f2070391f28391e3594580c07e11b6b32b.tar.gz cpython-1f7df8f2070391f28391e3594580c07e11b6b32b.tar.bz2 | |
merge heads
Diffstat (limited to 'Lib/test/test_urllib2_localnet.py')
| -rw-r--r-- | Lib/test/test_urllib2_localnet.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py index 0fda770..ec34375 100644 --- a/Lib/test/test_urllib2_localnet.py +++ b/Lib/test/test_urllib2_localnet.py @@ -5,7 +5,9 @@ import urllib2 import BaseHTTPServer import unittest import hashlib + from test import test_support + mimetools = test_support.import_module('mimetools', deprecated=True) threading = test_support.import_module('threading') @@ -346,6 +348,12 @@ class TestUrlopen(BaseTestCase): for transparent redirection have been written. """ + def setUp(self): + proxy_handler = urllib2.ProxyHandler({}) + opener = urllib2.build_opener(proxy_handler) + urllib2.install_opener(opener) + super(TestUrlopen, self).setUp() + def start_server(self, responses): handler = GetRequestHandler(responses) |
