def show_google_results(self, query): beans = [] beans.append(FModel('"%s" not found trying Google search' % query)) g_results = google_search_results(query) for line in g_results: beans.append(FModel(line).add_is_file(True)) if not g_results: beans.append(FModel('Google not found %s' % query)) return beans
def test_find_word(self): list = google_search_results("Madonna", 10) self.assertEquals(10, len(list)) for line in list: self.assertTrue(line is not None)