aboutsummaryrefslogtreecommitdiff
path: root/test/test_youtube_subtitles.py
diff options
context:
space:
mode:
authorIsmael Mejia <iemejia@gmail.com>2013-02-22 04:50:05 +0100
committerFilippo Valsorda <filippo.valsorda@gmail.com>2013-03-20 08:41:54 +0100
commit2a4093eaf3af07fa0a74926ce09cb49aba73017e (patch)
tree8c993997506e889bd2f3f72f2964aa32f5b5a848 /test/test_youtube_subtitles.py
parent9e62bc443996c1950de0841997c76d110cb77c6e (diff)
Added new option '--list-subs' to show the available subtitle languages
Diffstat (limited to 'test/test_youtube_subtitles.py')
-rw-r--r--test/test_youtube_subtitles.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_youtube_subtitles.py b/test/test_youtube_subtitles.py
index 94adc4555..30f2246dd 100644
--- a/test/test_youtube_subtitles.py
+++ b/test/test_youtube_subtitles.py
@@ -43,6 +43,7 @@ class TestYoutubeSubtitles(unittest.TestCase):
DL.params['allsubtitles'] = False
DL.params['writesubtitles'] = False
DL.params['subtitlesformat'] = 'srt'
+ DL.params['listsubtitles'] = False
def test_youtube_no_subtitles(self):
DL = FakeDownloader()
DL.params['writesubtitles'] = False
@@ -88,6 +89,12 @@ class TestYoutubeSubtitles(unittest.TestCase):
info_dict = IE.extract('QRS8MkLhQmM')
sub = info_dict[0]['subtitles'][0]
self.assertEqual(md5(sub[2]), '13aeaa0c245a8bed9a451cb643e3ad8b')
+ def test_youtube_list_subtitles(self):
+ DL = FakeDownloader()
+ DL.params['listsubtitles'] = True
+ IE = YoutubeIE(DL)
+ info_dict = IE.extract('QRS8MkLhQmM')
+ self.assertEqual(info_dict, None)
if __name__ == '__main__':
unittest.main()