diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2011-07-31 03:48:54 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2011-07-31 03:48:54 (GMT) |
commit | 23c2104118194cd04ce8f2378619c23c4a72ca49 (patch) | |
tree | fd8c38d1a443aa0a665226ffd3d6533b9a7e83e4 /Lib | |
parent | 4cfdb077fd45a5b017803e9429388f51a7536a2b (diff) | |
download | cpython-23c2104118194cd04ce8f2378619c23c4a72ca49.zip cpython-23c2104118194cd04ce8f2378619c23c4a72ca49.tar.gz cpython-23c2104118194cd04ce8f2378619c23c4a72ca49.tar.bz2 |
using test_support.transient_internet helper method in the urllib2net test.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_urllib2net.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py index 1375cda..4894151 100644 --- a/Lib/test/test_urllib2net.py +++ b/Lib/test/test_urllib2net.py @@ -190,9 +190,11 @@ class OtherNetworkTests(unittest.TestCase): # 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 |