mirror of https://github.com/python/cpython
using test_support.transient_internet helper method in the urllib2net test.
This commit is contained in:
parent
4cfdb077fd
commit
23c2104118
|
@ -190,7 +190,9 @@ class OtherNetworkTests(unittest.TestCase):
|
||||||
# Some sites do not send Connection: close header.
|
# Some sites do not send Connection: close header.
|
||||||
# Verify that those work properly. (#issue12576)
|
# Verify that those work properly. (#issue12576)
|
||||||
|
|
||||||
req = urllib2.urlopen('http://www.imdb.com')
|
URL = 'http://www.imdb.com' # No Connection:close
|
||||||
|
with test_support.transient_internet(url):
|
||||||
|
req = urllib2.urlopen(URL)
|
||||||
res = req.read()
|
res = req.read()
|
||||||
self.assertTrue(res)
|
self.assertTrue(res)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue