Commits

Senthil Kumaran committed abf6887

using test_support.transient_internet helper method in the urllib2net test.

  • Participants
  • Parent commits 952e83a
  • Branches 2.7

Comments (0)

Files changed (1)

Lib/test/test_urllib2net.py

         # Some sites do not send Connection: close header.
         # Verify that those work properly. (#issue12576)
 
-        req = urllib2.urlopen('http://www.imdb.com')
-        res = req.read()
-        self.assertTrue(res)
+        URL = 'http://www.imdb.com' # No Connection:close
+        with test_support.transient_internet(url):
+            req = urllib2.urlopen(URL)
+            res = req.read()
+            self.assertTrue(res)
 
     def _test_urls(self, urls, handlers, retry=True):
         import time