def test_get_subtitles(self): ezflix = Ezflix(query='Mad Max', media_type='movie', limit=20) torrents = ezflix.search() self.assertTrue(len(torrents) > 0) movie_title = torrents[0]['title'] subtitles = ezflix.search_subtitles(movie_title) self.assertIsNotNone(subtitles) cur_dir = os.getcwd() file_list = os.listdir(cur_dir) for f in file_list: if movie_title in f: os.remove(f)
def test_get_subtitles_invalid_title(self): ezflix = Ezflix(query="sklsos", media_type="movie", limit=20) subtitles = ezflix.search_subtitles("psl2232ssd2") self.assertIsNone(subtitles)
def test_get_subtitles_invalid_title(self): ezflix = Ezflix(query='sklsos', media_type='movie', limit=20) subtitles = ezflix.search_subtitles('psl2232ssd2') self.assertIsNone(subtitles)