def test_download(self): search = Search(max_results=221, max_chunk_results=33, time_sleep=0) with patch.object(feedparser, "parse", new_callable=get_parse_callable): results = search.download(iterative=False) self.assertEqual(len(results), 221)
def test_download_iterator(self): search = Search(max_results=221, max_results_per_call=33, time_sleep=0) with patch.object(feedparser, "parse", new_callable=get_parse_callable): results = search.download(iterative=True) self.assertTrue(callable(results))