def testNoProtocol(self): url = fetchURL("www.some.com/index.html") parser = URLParser(url.url) protocol = parser.getProtocol() self.assertEqual(protocol, "")
def testUnknownProtocol(self): url = fetchURL("qwery://www.some.com/index.html") parser = URLParser(url.url) protocol = parser.getProtocol() self.assertEqual(protocol, "qwery")
def testHTTPProtocl(self): url = fetchURL("http://www.some.com/index.html") parser = URLParser(url.url) protocol = parser.getProtocol() self.assertEqual(protocol, "http")