Esempio n. 1
0
class OpenSubtitlesTestCase(unittest.TestCase):
    def setUp(self):
        from subliminal.plugins import OpenSubtitles
        self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1}
        self.plugin = OpenSubtitles(self.config)
        self.languages = set(['en', 'fr'])

    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
Esempio n. 2
0
class OpenSubtitlesTestCase(unittest.TestCase):
    def setUp(self):
        from subliminal.plugins import OpenSubtitles
        self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1}
        self.plugin = OpenSubtitles(self.config)
        self.languages = set(['en', 'fr'])

    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
Esempio n. 3
0
 def runTest(self):
     from subliminal.plugins import OpenSubtitles
     plugin = OpenSubtitles()
     results = plugin.query('Night.Watch.2004.CD1.DVDRiP.XViD-FiCO.avi', languages=['en', 'fr'])  # http://trac.opensubtitles.org/projects/opensubtitles/wiki/XMLRPC
     print results
     assert len(results) > 0
Esempio n. 4
0
 def runTest(self):
     from subliminal.plugins import OpenSubtitles
     plugin = OpenSubtitles()
     results = plugin.query('Night.Watch.2004.CD1.DVDRiP.XViD-FiCO.avi', moviehash="09a2c497663259cb", bytesize="733589504")  # http://trac.opensubtitles.org/projects/opensubtitles/wiki/XMLRPC
     print results
     assert len(results) > 0
Esempio n. 5
0
 def setUp(self):
     from subliminal.plugins import OpenSubtitles
     self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1}
     self.plugin = OpenSubtitles(self.config)
     self.languages = set(['en', 'fr'])
Esempio n. 6
0
 def setUp(self):
     from subliminal.plugins import OpenSubtitles
     self.config = {'multi': True, 'cache_dir': cache_dir, 'files_mode': -1}
     self.plugin = OpenSubtitles(self.config)
     self.languages = set(['en', 'fr'])