Ejemplo n.º 1
0
class TestSaholicCrawler(unittest.TestCase):
            
    def setUp(self):
        self.crawler = SaholicCrawler({ "url" : "http://localhost/page" })

    def tearDown(self):
        self.crawler = None
        
    def test_crawl_page(self):
        self.crawler.crawl_page = Mock(return_value="Mock Page!")
        self.assertEquals("Mock Page!", self.crawler.crawl_page())
Ejemplo n.º 2
0
 def setUp(self):
     self.crawler = SaholicCrawler({ "url" : "http://localhost/page" })