diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2014-03-05 13:22:10 +0100 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2014-03-05 13:22:10 +0100 |
commit | ca1fee34f22e3fac9cc7a55c55c7aa7519f788b3 (patch) | |
tree | 43149ad6dffd451c3d19a85c8abbaece15f5b9ef /test | |
parent | 6dadaa99300ae7a123b2ca5bd306ada32f48a632 (diff) |
[ted] Fix playlist extraction and add a test
Diffstat (limited to 'test')
-rw-r--r-- | test/test_playlists.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_playlists.py b/test/test_playlists.py index 07c85b322..4bd815a0e 100644 --- a/test/test_playlists.py +++ b/test/test_playlists.py @@ -36,6 +36,7 @@ from youtube_dl.extractor import ( RutubeChannelIE, GoogleSearchIE, GenericIE, + TEDIE, ) @@ -259,5 +260,14 @@ class TestPlaylists(unittest.TestCase): self.assertEqual(result['title'], 'Zero Punctuation') self.assertTrue(len(result['entries']) > 10) + def test_ted_playlist(self): + dl = FakeYDL() + ie = TEDIE(dl) + result = ie.extract('http://www.ted.com/playlists/who_are_the_hackers') + self.assertIsPlaylist(result) + self.assertEqual(result['id'], '10') + self.assertEqual(result['title'], 'Who are the hackers?') + self.assertTrue(len(result['entries']) >= 6) + if __name__ == '__main__': unittest.main() |