def test_download_subtitle(self): video = EPISODES[0] languages = {Language('eng'), Language('fra')} with self.Provider() as provider: subtitles = provider.list_subtitles(video, languages) subtitle_text = provider.download_subtitle(subtitles[0]) self.assertTrue(is_valid_subtitle(subtitle_text))
def test_download_subtitle(self): video = EPISODES[0] languages = {Language('hun')} with self.Provider() as provider: subtitles = provider.list_subtitles(video, languages) provider.download_subtitle(subtitles[0]) self.assertIsNotNone(subtitles[0].content) self.assertTrue(is_valid_subtitle(subtitles[0].content))