Example #1
0
    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")
Example #2
0
    def testHTTPNoPageWithoutProtocol(self):
        url = fetchURL("www.some.com/")
        parser = URLParser(url.url)
        protocol = parser.getPage()

        self.assertEqual(protocol, "")
Example #3
0
    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")