예제 #1
0
class SubsWikiTestCase(unittest.TestCase):
    def setUp(self):
        from subliminal.plugins import SubsWiki
        self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1}
        self.plugin = SubsWiki(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
예제 #2
0
class SubsWikiTestCase(unittest.TestCase):
    def setUp(self):
        from subliminal.plugins import SubsWiki
        self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1}
        self.plugin = SubsWiki(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
예제 #3
0
 def runTest(self):
     from subliminal.plugins import SubsWiki
     plugin = SubsWiki()
     results = plugin.download(plugin.list(["/tmp/The.Big.Bang.Theory.S03E13.HDTV.XviD-2HD.mkv"], ['en', 'es'])[0])
     print results
     assert len(results) > 0
예제 #4
0
 def setUp(self):
     from subliminal.plugins import SubsWiki
     self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1}
     self.plugin = SubsWiki(self.config)
     self.languages = set(['en', 'fr', 'es', 'pt'])
예제 #5
0
 def setUp(self):
     from subliminal.plugins import SubsWiki
     self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1}
     self.plugin = SubsWiki(self.config)
     self.languages = set(['en', 'fr', 'es', 'pt'])