コード例 #1
0
ファイル: URLParserTest.py プロジェクト: dockerized89/hyper
    def testHostNoProtocol(self):
        url = fetchURL("www.someothersite.com/index.html")
        parser = URLParser(url.url)
        host = protocol = parser.getHost()

        self.assertEqual(host, "www.someothersite.com")
コード例 #2
0
ファイル: URLParserTest.py プロジェクト: dockerized89/hyper
    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")