def testItReturnsTheCrawledUrls(self): crawler = Crawler() urlsToCrawl = ['http://google.se', 'http://aftonbladet.se'] for url in urlsToCrawl: crawler.add_to_crawl(url) result = crawler.crawl() self.assertEquals( urlsToCrawl, result, 'Not all urls that was supposed to be crawled was crawled.')
def testItCanCrawl(self): crawler = Crawler() crawler.add_to_crawl('http://google.se') crawler.crawl()