diff options
author | Ned Deily <nad@acm.org> | 2014-03-27 06:31:39 (GMT) |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2014-03-27 06:31:39 (GMT) |
commit | e558181660d096e3e53c795bc5a528cdbd04eca6 (patch) | |
tree | 80d7bb17d9a8e1bc86d5355379c45b6f8a9c617a /Lib/test/test_urllib2net.py | |
parent | fd9262cf2a044f6909530cdb565f38e13ff98263 (diff) | |
download | cpython-e558181660d096e3e53c795bc5a528cdbd04eca6.zip cpython-e558181660d096e3e53c795bc5a528cdbd04eca6.tar.gz cpython-e558181660d096e3e53c795bc5a528cdbd04eca6.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')
-rwxr-xr-x[-rw-r--r--] | Lib/test/test_urllib2net.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py index feeaf24..2c832e1 100644..100755 --- 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) |