From e558181660d096e3e53c795bc5a528cdbd04eca6 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Wed, 26 Mar 2014 23:31:39 -0700 Subject: Issue #20939: Use www.example.com instead of www.python.org to avoid test failures when ssl is not present. --- Lib/test/test_urllib2net.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 Lib/test/test_urllib2net.py (limited to 'Lib/test/test_urllib2net.py') diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py old mode 100644 new mode 100755 index feeaf24e8a..2c832e1f48 --- a/Lib/test/test_urllib2net.py +++ b/Lib/test/test_urllib2net.py @@ -84,7 +84,7 @@ class CloseSocketTest(unittest.TestCase): # calling .close() on urllib2's response objects should close the # underlying socket - response = _urlopen_with_retry("http://www.python.org/") + response = _urlopen_with_retry("http://www.example.com/") sock = response.fp self.assertTrue(not sock.closed) response.close() @@ -254,7 +254,7 @@ class OtherNetworkTests(unittest.TestCase): class TimeoutTest(unittest.TestCase): def test_http_basic(self): self.assertTrue(socket.getdefaulttimeout() is None) - 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) @@ -262,7 +262,7 @@ class TimeoutTest(unittest.TestCase): def test_http_default_timeout(self): self.assertTrue(socket.getdefaulttimeout() is None) - url = "http://www.python.org" + url = "http://www.example.com" with support.transient_internet(url): socket.setdefaulttimeout(60) try: @@ -274,7 +274,7 @@ class TimeoutTest(unittest.TestCase): def test_http_no_timeout(self): self.assertTrue(socket.getdefaulttimeout() is None) - url = "http://www.python.org" + url = "http://www.example.com" with support.transient_internet(url): socket.setdefaulttimeout(60) try: @@ -285,7 +285,7 @@ class TimeoutTest(unittest.TestCase): self.assertTrue(u.fp.raw._sock.gettimeout() is None) 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) -- cgit v1.2.1