Issue #20939: Use www.example.com instead of www.python.org to avoid test
failures when ssl is not present.
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index 4f81c28..ed2654c 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -78,7 +78,7 @@
# underlying socket
# delve deep into response to fetch socket._socketobject
- response = _urlopen_with_retry("http://www.python.org/")
+ response = _urlopen_with_retry("http://www.example.com/")
abused_fileobject = response.fp
self.assertIs(abused_fileobject.__class__, socket._fileobject)
httpresponse = abused_fileobject._sock
@@ -163,7 +163,7 @@
"http://docs.python.org/2/glossary.html#glossary")
def test_fileno(self):
- req = urllib2.Request("http://www.python.org")
+ req = urllib2.Request("http://www.example.com")
opener = urllib2.build_opener()
res = opener.open(req)
try:
@@ -251,14 +251,14 @@
class TimeoutTest(unittest.TestCase):
def test_http_basic(self):
self.assertIsNone(socket.getdefaulttimeout())
- url = "http://www.python.org"
+ url = "http://www.example.com"
with test_support.transient_internet(url, timeout=None):
u = _urlopen_with_retry(url)
self.assertIsNone(u.fp._sock.fp._sock.gettimeout())
def test_http_default_timeout(self):
self.assertIsNone(socket.getdefaulttimeout())
- url = "http://www.python.org"
+ url = "http://www.example.com"
with test_support.transient_internet(url):
socket.setdefaulttimeout(60)
try:
@@ -269,7 +269,7 @@
def test_http_no_timeout(self):
self.assertIsNone(socket.getdefaulttimeout())
- url = "http://www.python.org"
+ url = "http://www.example.com"
with test_support.transient_internet(url):
socket.setdefaulttimeout(60)
try:
@@ -279,7 +279,7 @@
self.assertIsNone(u.fp._sock.fp._sock.gettimeout())
def test_http_timeout(self):
- url = "http://www.python.org"
+ url = "http://www.example.com"
with test_support.transient_internet(url):
u = _urlopen_with_retry(url, timeout=120)
self.assertEqual(u.fp._sock.fp._sock.gettimeout(), 120)