def test_finds_pages(self): generator = ProductScraper('http://www.example.com/gets_page') generator.master_parser_class = TestParserClass generator.product_parser_class = TestParserClass generator.GetProducts() self.assertIn('data', generator.products)
def test_works_with_404_responses(self): generator = ProductScraper('http://www.example.com/404') generator.master_parser_class = TestParserClass generator.product_parser_class = TestParserClass generator.GetProducts()