summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-04-29 07:36:20 (GMT)
committerGitHub <noreply@github.com>2020-04-29 07:36:20 (GMT)
commitbfb1cf44658934cbcd9707fb717d6770c78fbeb3 (patch)
treea9dcce79d42f76509491b3d8b165f6737143cbc5 /Lib/test/test_urllib2.py
parentbb4a585d903e7fe0a46ded8c2ee3f47435ad6a66 (diff)
downloadcpython-bfb1cf44658934cbcd9707fb717d6770c78fbeb3.zip
cpython-bfb1cf44658934cbcd9707fb717d6770c78fbeb3.tar.gz
cpython-bfb1cf44658934cbcd9707fb717d6770c78fbeb3.tar.bz2
bpo-40275: Move transient_internet from test.support to socket_helper (GH-19711)
Diffstat (limited to 'Lib/test/test_urllib2.py')
-rw-r--r--Lib/test/test_urllib2.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index e69ac3e..cbfa9ba 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -1,5 +1,6 @@
import unittest
from test import support
+from test.support import socket_helper
from test import test_urllib
import os
@@ -1776,7 +1777,7 @@ class MiscTests(unittest.TestCase):
@unittest.skipUnless(support.is_resource_enabled('network'),
'test requires network access')
def test_issue16464(self):
- with support.transient_internet("http://www.example.com/"):
+ with socket_helper.transient_internet("http://www.example.com/"):
opener = urllib.request.build_opener()
request = urllib.request.Request("http://www.example.com/")
self.assertEqual(None, request.data)