gh-77476: Remove urllib HTTP test by vstinner · Pull Request #139502 · python/cpython
Expand Up
@@ -218,27 +218,6 @@ def test_custom_headers(self):
opener.open(request)
self.assertEqual(request.get_header('User-agent'),'Test-Agent')
@unittest.skip('XXX: http://www.imdb.com is gone') def test_sites_no_connection_close(self): # Some sites do not send Connection: close header. # Verify that those work properly. (#issue12576)
URL = 'http://www.imdb.com' # mangles Connection:close
with socket_helper.transient_internet(URL): try: with urllib.request.urlopen(URL) as res: pass except ValueError: self.fail("urlopen failed for site not sending \ Connection:close") else: self.assertTrue(res)
req = urllib.request.urlopen(URL) res = req.read() self.assertTrue(res)
def _test_urls(self, urls, handlers, retry=True): import time import logging Expand Down
@unittest.skip('XXX: http://www.imdb.com is gone') def test_sites_no_connection_close(self): # Some sites do not send Connection: close header. # Verify that those work properly. (#issue12576)
URL = 'http://www.imdb.com' # mangles Connection:close
with socket_helper.transient_internet(URL): try: with urllib.request.urlopen(URL) as res: pass except ValueError: self.fail("urlopen failed for site not sending \ Connection:close") else: self.assertTrue(res)
req = urllib.request.urlopen(URL) res = req.read() self.assertTrue(res)
def _test_urls(self, urls, handlers, retry=True): import time import logging Expand Down