Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
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'])
Ejemplo n.º 5
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'])