Example #1
0
    def testHostNoProtocol(self):
        url = fetchURL("www.someothersite.com/index.html")
        parser = URLParser(url.url)
        host = protocol = parser.getHost()

        self.assertEqual(host, "www.someothersite.com")
Example #2
0
    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")