summaryrefslogtreecommitdiff
path: root/Lib/test/test_urllib2_localnet.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-08-04 23:51:43 +0800
committerGitHub <noreply@github.com>2020-08-04 17:51:43 +0200
commit604bba1f8fe32479c89b9824b2231cc4480dd110 (patch)
tree5b520e35b874539336997822a8d3d7bc621877b1 /Lib/test/test_urllib2_localnet.py
parentda4e09fff6b483fe858997da5599c25397107ca1 (diff)
downloadcpython-git-604bba1f8fe32479c89b9824b2231cc4480dd110.tar.gz
bpo-40275: Use new test.support helper submodules in tests (GH-21452)
Diffstat (limited to 'Lib/test/test_urllib2_localnet.py')
-rw-r--r--Lib/test/test_urllib2_localnet.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py
index e568cc4575..ebb43c30b4 100644
--- a/Lib/test/test_urllib2_localnet.py
+++ b/Lib/test/test_urllib2_localnet.py
@@ -8,9 +8,9 @@ import threading
import unittest
import hashlib
-from test import support
from test.support import hashlib_helper
from test.support import threading_helper
+from test.support import warnings_helper
try:
import ssl
@@ -567,7 +567,7 @@ class TestUrlopen(unittest.TestCase):
def test_https_with_cafile(self):
handler = self.start_https_server(certfile=CERT_localhost)
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
# Good cert
data = self.urlopen("https://localhost:%s/bizarre" % handler.port,
cafile=CERT_localhost)
@@ -585,7 +585,7 @@ class TestUrlopen(unittest.TestCase):
def test_https_with_cadefault(self):
handler = self.start_https_server(certfile=CERT_localhost)
# Self-signed cert should fail verification with system certificate store
- with support.check_warnings(('', DeprecationWarning)):
+ with warnings_helper.check_warnings(('', DeprecationWarning)):
with self.assertRaises(urllib.error.URLError) as cm:
self.urlopen("https://localhost:%s/bizarre" % handler.port,
cadefault=True)