summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2net.py
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-03-27 06:31:39 (GMT)
committerNed Deily <nad@acm.org>2014-03-27 06:31:39 (GMT)
commit5a507f0f05d6204559af7c54aabe3bd3a6953dfd (patch)
tree0fbcb79b8d95c8f5fd9075ac45a9ae766b48bf8e /Lib/test/test_urllib2net.py
parente74153a436a844f4606cba80ee6f9e41bd532df4 (diff)
downloadcpython-5a507f0f05d6204559af7c54aabe3bd3a6953dfd.zip
cpython-5a507f0f05d6204559af7c54aabe3bd3a6953dfd.tar.gz
cpython-5a507f0f05d6204559af7c54aabe3bd3a6953dfd.tar.bz2
Issue #20939: Use www.example.com instead of www.python.org to avoid test
failures when ssl is not present.
Diffstat (limited to 'Lib/test/test_urllib2net.py')
-rw-r--r--Lib/test/test_urllib2net.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index 78891fd..3b2f2b8 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -83,7 +83,7 @@ class CloseSocketTest(unittest.TestCase):
def test_close(self):
# calling .close() on urllib2's response objects should close the
# underlying socket
- url = "http://www.python.org/"
+ url = "http://www.example.com/"
with support.transient_internet(url):
response = _urlopen_with_retry(url)
sock = response.fp
@@ -263,7 +263,7 @@ class OtherNetworkTests(unittest.TestCase):
class TimeoutTest(unittest.TestCase):
def test_http_basic(self):
self.assertIsNone(socket.getdefaulttimeout())
- url = "http://www.python.org"
+ url = "http://www.example.com"
with support.transient_internet(url, timeout=None):
u = _urlopen_with_retry(url)
self.addCleanup(u.close)
@@ -271,7 +271,7 @@ class TimeoutTest(unittest.TestCase):
def test_http_default_timeout(self):
self.assertIsNone(socket.getdefaulttimeout())
- url = "http://www.python.org"
+ url = "http://www.example.com"
with support.transient_internet(url):
socket.setdefaulttimeout(60)
try:
@@ -283,7 +283,7 @@ class TimeoutTest(unittest.TestCase):
def test_http_no_timeout(self):
self.assertIsNone(socket.getdefaulttimeout())
- url = "http://www.python.org"
+ url = "http://www.example.com"
with support.transient_internet(url):
socket.setdefaulttimeout(60)
try:
@@ -294,7 +294,7 @@ class TimeoutTest(unittest.TestCase):
self.assertIsNone(u.fp.raw._sock.gettimeout())
def test_http_timeout(self):
- url = "http://www.python.org"
+ url = "http://www.example.com"
with support.transient_internet(url):
u = _urlopen_with_retry(url, timeout=120)
self.addCleanup(u.close)