summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_httplib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_httplib.py')
-rw-r--r--Lib/test/test_httplib.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index 6b7a9de..e95487b 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -1629,7 +1629,7 @@ class HTTPSTest(TestCase):
# Default settings: requires a valid cert from a trusted CA
import ssl
support.requires('network')
- with support.transient_internet('self-signed.pythontest.net'):
+ with socket_helper.transient_internet('self-signed.pythontest.net'):
h = client.HTTPSConnection('self-signed.pythontest.net', 443)
with self.assertRaises(ssl.SSLError) as exc_info:
h.request('GET', '/')
@@ -1639,7 +1639,7 @@ class HTTPSTest(TestCase):
# Switch off cert verification
import ssl
support.requires('network')
- with support.transient_internet('self-signed.pythontest.net'):
+ with socket_helper.transient_internet('self-signed.pythontest.net'):
context = ssl._create_unverified_context()
h = client.HTTPSConnection('self-signed.pythontest.net', 443,
context=context)
@@ -1653,7 +1653,7 @@ class HTTPSTest(TestCase):
def test_networked_trusted_by_default_cert(self):
# Default settings: requires a valid cert from a trusted CA
support.requires('network')
- with support.transient_internet('www.python.org'):
+ with socket_helper.transient_internet('www.python.org'):
h = client.HTTPSConnection('www.python.org', 443)
h.request('GET', '/')
resp = h.getresponse()
@@ -1667,7 +1667,7 @@ class HTTPSTest(TestCase):
import ssl
support.requires('network')
selfsigned_pythontestdotnet = 'self-signed.pythontest.net'
- with support.transient_internet(selfsigned_pythontestdotnet):
+ with socket_helper.transient_internet(selfsigned_pythontestdotnet):
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
self.assertEqual(context.verify_mode, ssl.CERT_REQUIRED)
self.assertEqual(context.check_hostname, True)
@@ -1699,7 +1699,7 @@ class HTTPSTest(TestCase):
# We feed a "CA" cert that is unrelated to the server's cert
import ssl
support.requires('network')
- with support.transient_internet('self-signed.pythontest.net'):
+ with socket_helper.transient_internet('self-signed.pythontest.net'):
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
context.load_verify_locations(CERT_localhost)
h = client.HTTPSConnection('self-signed.pythontest.net', 443, context=context)