aboutsummaryrefslogtreecommitdiff
path: root/test/test_subtitles.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-11-04 00:53:30 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-11-04 00:53:30 +0800
commit66d041f250f7d3e0c4d501e3b98721f2c6588c35 (patch)
tree29d5eeffb86db624fdb9eca2ddd8c5fbfa93294e /test/test_subtitles.py
parentf3cb54e6d948005dcb51f4cb4735379337c899da (diff)
[test/subtitles] Add test for DemocracynowIE
Diffstat (limited to 'test/test_subtitles.py')
-rw-r--r--test/test_subtitles.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_subtitles.py b/test/test_subtitles.py
index 0343967d9..75f0ea75f 100644
--- a/test/test_subtitles.py
+++ b/test/test_subtitles.py
@@ -28,6 +28,7 @@ from youtube_dl.extractor import (
ThePlatformFeedIE,
RTVEALaCartaIE,
FunnyOrDieIE,
+ DemocracynowIE,
)
@@ -346,5 +347,25 @@ class TestFunnyOrDieSubtitles(BaseTestSubtitles):
self.assertEqual(md5(subtitles['en']), 'c5593c193eacd353596c11c2d4f9ecc4')
+class TestDemocracynowSubtitles(BaseTestSubtitles):
+ url = 'http://www.democracynow.org/shows/2015/7/3'
+ IE = DemocracynowIE
+
+ def test_allsubtitles(self):
+ 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']), 'acaca989e24a9e45a6719c9b3d60815c')
+
+ def test_subtitles_in_page(self):
+ self.url = 'http://www.democracynow.org/2015/7/3/this_flag_comes_down_today_bree'
+ 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']), 'acaca989e24a9e45a6719c9b3d60815c')
+
+
if __name__ == '__main__':
unittest.main()