class SubtitulosTestCase(unittest.TestCase): def setUp(self): from subliminal.plugins import Subtitulos self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1} self.plugin = Subtitulos(self.config) self.languages = set(['en', 'fr', 'es', 'pt']) def test_list(self): list = self.plugin.list(test_file, self.languages) assert list def test_download(self): subtitle = self.plugin.list(test_file, self.languages)[0] if os.path.exists(subtitle.path): os.remove(subtitle.path) download = self.plugin.download(subtitle) assert download
def runTest(self): from subliminal.plugins import Subtitulos plugin = Subtitulos() results = plugin.download(plugin.list(["/tmp/The.Big.Bang.Theory.S03E13.HDTV.XviD-2HD.mkv"], ['en', 'fr'])[0]) print results assert len(results) > 0
def setUp(self): from subliminal.plugins import Subtitulos self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1} self.plugin = Subtitulos(self.config) self.languages = set(['en', 'fr', 'es', 'pt'])