def testHostNoProtocol(self): url = fetchURL("www.someothersite.com/index.html") parser = URLParser(url.url) host = protocol = parser.getHost() self.assertEqual(host, "www.someothersite.com")
def testHost1(self): url = fetchURL("http://www.some.com/index.html") parser = URLParser(url.url) host = protocol = parser.getHost() self.assertEqual(host, "www.some.com")