class TheSubDBTestCase(unittest.TestCase): def setUp(self): from subliminal.plugins import TheSubDB self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1} self.plugin = TheSubDB(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
class TheSubDBTestCase(unittest.TestCase): def setUp(self): from subliminal.plugins import TheSubDB self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1} self.plugin = TheSubDB(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 TheSubDB plugin = TheSubDB() results = plugin.download(plugin.query("/tmp/test.mkv", "edc1981d6459c6111fe36205b4aff6c2")[0]) print results assert len(results) > 0
def setUp(self): from subliminal.plugins import TheSubDB self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1} self.plugin = TheSubDB(self.config) self.languages = set(['en', 'fr', 'es', 'pt'])
def setUp(self): from subliminal.plugins import TheSubDB self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1} self.plugin = TheSubDB(self.config) self.languages = set(['en', 'fr', 'es', 'pt'])