diff options
author | Ismael Mejia <iemejia@gmail.com> | 2013-02-22 04:50:05 +0100 |
---|---|---|
committer | Filippo Valsorda <filippo.valsorda@gmail.com> | 2013-03-20 08:41:54 +0100 |
commit | 2a4093eaf3af07fa0a74926ce09cb49aba73017e (patch) | |
tree | 8c993997506e889bd2f3f72f2964aa32f5b5a848 /test | |
parent | 9e62bc443996c1950de0841997c76d110cb77c6e (diff) |
Added new option '--list-subs' to show the available subtitle languages
Diffstat (limited to 'test')
-rw-r--r-- | test/parameters.json | 3 | ||||
-rw-r--r-- | test/test_youtube_subtitles.py | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/test/parameters.json b/test/parameters.json index 750b1c96e..96998b5c3 100644 --- a/test/parameters.json +++ b/test/parameters.json @@ -39,5 +39,6 @@ "writeinfojson": true, "writesubtitles": false, "onlysubtitles": false, - "allsubtitles": false + "allsubtitles": false, + "listssubtitles": false } 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() |