Kaydet (Commit) 23c21041 authored tarafından Senthil Kumaran's avatar Senthil Kumaran

using test_support.transient_internet helper method in the urllib2net test.

üst 4cfdb077
...@@ -190,9 +190,11 @@ class OtherNetworkTests(unittest.TestCase): ...@@ -190,9 +190,11 @@ 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
res = req.read() with test_support.transient_internet(url):
self.assertTrue(res) req = urllib2.urlopen(URL)
res = req.read()
self.assertTrue(res)
def _test_urls(self, urls, handlers, retry=True): def _test_urls(self, urls, handlers, retry=True):
import time import time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment