def testHTTPPageWithoutProtocol(self): url = fetchURL("www.some.com/someootherfolder/one/two/three/index.html") parser = URLParser(url.url) protocol = parser.getPage() self.assertEqual(protocol, "someootherfolder/one/two/three/index.html")
def testHTTPNoPageWithoutProtocol(self): url = fetchURL("www.some.com/") parser = URLParser(url.url) protocol = parser.getPage() self.assertEqual(protocol, "")
def testHTTPPage2(self): url = fetchURL("http://www.some.com/someootherfolder/index.html") parser = URLParser(url.url) protocol = parser.getPage() self.assertEqual(protocol, "someootherfolder/index.html")