mirror of
https://github.com/python/cpython.git
synced 2025-09-25 09:50:37 +00:00
Issue #16702: Skip proxies for localhost in urllib2_localnet tests
This commit is contained in:
parent
cf4710c323
commit
2f01e239cb
2 changed files with 11 additions and 0 deletions
|
@ -5,7 +5,9 @@ import urllib2
|
||||||
import BaseHTTPServer
|
import BaseHTTPServer
|
||||||
import unittest
|
import unittest
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from test import test_support
|
from test import test_support
|
||||||
|
|
||||||
mimetools = test_support.import_module('mimetools', deprecated=True)
|
mimetools = test_support.import_module('mimetools', deprecated=True)
|
||||||
threading = test_support.import_module('threading')
|
threading = test_support.import_module('threading')
|
||||||
|
|
||||||
|
@ -346,6 +348,12 @@ class TestUrlopen(BaseTestCase):
|
||||||
for transparent redirection have been written.
|
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):
|
def start_server(self, responses):
|
||||||
handler = GetRequestHandler(responses)
|
handler = GetRequestHandler(responses)
|
||||||
|
|
||||||
|
|
|
@ -164,6 +164,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #16702: test_urllib2_localnet tests now correctly ignores proxies for
|
||||||
|
localhost tests.
|
||||||
|
|
||||||
- Issue #16713: Fix the parsing of tel url with params using urlparse module.
|
- Issue #16713: Fix the parsing of tel url with params using urlparse module.
|
||||||
|
|
||||||
- Issue #16443: Add docstrings to regular expression match objects.
|
- Issue #16443: Add docstrings to regular expression match objects.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue