Esempio n. 1
0
 def test__same_host_fail(self):
     c = Crawler()
     c.host = 'www.example.com'
     self.assertFalse(bool(c._same_host('http:/yourname.xyz/file.html')))
Esempio n. 2
0
 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')))