Unskip testPythonOrg in test_robotparser

We should probably use pythontest.net for this.
This commit is contained in:
Berker Peksag 2016-09-11 15:27:07 +03:00
parent a1e9ab34a9
commit 966ad74bf9

View file

@ -272,12 +272,11 @@ class PasswordProtectedSiteTestCase(unittest.TestCase):
class NetworkTestCase(unittest.TestCase): class NetworkTestCase(unittest.TestCase):
@unittest.skip('does not handle the gzip encoding delivered by pydotorg')
def testPythonOrg(self): def testPythonOrg(self):
support.requires('network') support.requires('network')
with support.transient_internet('www.python.org'): with support.transient_internet('www.python.org'):
parser = urllib.robotparser.RobotFileParser( parser = urllib.robotparser.RobotFileParser(
"http://www.python.org/robots.txt") "https://www.python.org/robots.txt")
parser.read() parser.read()
self.assertTrue( self.assertTrue(
parser.can_fetch("*", "http://www.python.org/robots.txt")) parser.can_fetch("*", "http://www.python.org/robots.txt"))