diff options
author | Jaime Marquínez Ferrándiz <[email protected]> | 2013-11-10 12:09:12 +0100 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <[email protected]> | 2013-11-10 12:09:12 +0100 |
commit | be6dfd1b4954e32009f788ea55ee06bb82781f4b (patch) | |
tree | e56d7a221bfca1cbb43ccbf552350ba70e828992 /test | |
parent | 231516b6c983561cdfb7d58a07bb78a5fa132e10 (diff) | |
download | youtube-dl-be6dfd1b4954e32009f788ea55ee06bb82781f4b.tar.gz youtube-dl-be6dfd1b4954e32009f788ea55ee06bb82781f4b.zip |
[ted] Return a single info_dict for talks urls
It failed with the --list-subs option
Diffstat (limited to 'test')
-rw-r--r-- | test/test_ted_subtitles.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/test_ted_subtitles.py b/test/test_ted_subtitles.py index a0dd7eeed..4c164ae99 100644 --- a/test/test_ted_subtitles.py +++ b/test/test_ted_subtitles.py @@ -10,9 +10,7 @@ sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.extractor import TEDIE from youtube_dl.utils import * -from helper import FakeYDL - -md5 = lambda s: hashlib.md5(s.encode('utf-8')).hexdigest() +from test.helper import FakeYDL, md5 class TestTedSubtitles(unittest.TestCase): def setUp(self): @@ -24,7 +22,7 @@ class TestTedSubtitles(unittest.TestCase): return info_dict def getSubtitles(self): info_dict = self.getInfoDict() - return info_dict[0]['subtitles'] + return info_dict['subtitles'] def test_no_writesubtitles(self): subtitles = self.getSubtitles() self.assertEqual(subtitles, None) @@ -45,7 +43,7 @@ class TestTedSubtitles(unittest.TestCase): def test_list_subtitles(self): self.DL.params['listsubtitles'] = True info_dict = self.getInfoDict() - self.assertEqual(info_dict, [None]) + self.assertEqual(info_dict, None) def test_automatic_captions(self): self.DL.params['writeautomaticsub'] = True self.DL.params['subtitleslang'] = ['en'] |