コード例 #1
0
ファイル: test_crawler.py プロジェクト: rrbarbieri/crawler
 def test__same_host_fail(self):
     c = Crawler()
     c.host = 'www.example.com'
     self.assertFalse(bool(c._same_host('http:/yourname.xyz/file.html')))
コード例 #2
0
ファイル: test_crawler.py プロジェクト: rrbarbieri/crawler
 def test__same_host_pass(self):
     c = Crawler()
     c.host = 'www.example.com'
     self.assertTrue(bool(c._same_host('http://www.example.com/file.html')))