diff options
Diffstat (limited to 'test/test_subtitles.py')
-rw-r--r-- | test/test_subtitles.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_subtitles.py b/test/test_subtitles.py index 1e4e62faa..5b8076e9d 100644 --- a/test/test_subtitles.py +++ b/test/test_subtitles.py @@ -10,6 +10,7 @@ from test.helper import FakeYDL, md5 from youtube_dl.extractor import ( + BlipTVIE, YoutubeIE, DailymotionIE, TEDIE, @@ -202,5 +203,25 @@ class TestTedSubtitles(BaseTestSubtitles): for lang in langs: self.assertTrue(subtitles.get(lang) is not None, u'Subtitles for \'%s\' not extracted' % lang) + +class TestBlipTVSubtitles(BaseTestSubtitles): + url = 'http://blip.tv/a/a-6603250' + IE = BlipTVIE + + def test_list_subtitles(self): + self.DL.expect_warning(u'Automatic Captions not supported by this server') + self.DL.params['listsubtitles'] = True + info_dict = self.getInfoDict() + self.assertEqual(info_dict, None) + + def test_allsubtitles(self): + self.DL.expect_warning(u'Automatic Captions not supported by this server') + self.DL.params['writesubtitles'] = True + self.DL.params['allsubtitles'] = True + subtitles = self.getSubtitles() + self.assertEqual(set(subtitles.keys()), set(['en'])) + self.assertEqual(md5(subtitles['en']), '5b75c300af65fe4476dff79478bb93e4') + + if __name__ == '__main__': unittest.main() |