X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=test%2Ftest_playlists.py;h=4785161f2afad3e224fb1864335b0ff8530d6fc2;hb=9e55e37a2e0e3a4e7d3fac2efd4ea13efe689b0e;hp=07c85b322afe054f19722eea1855304dbd2d610f;hpb=9e57ce716f03daa8ae27979af757819078595d6a;p=youtube-dl.git diff --git a/test/test_playlists.py b/test/test_playlists.py index 07c85b322..4785161f2 100644 --- a/test/test_playlists.py +++ b/test/test_playlists.py @@ -36,6 +36,7 @@ from youtube_dl.extractor import ( RutubeChannelIE, GoogleSearchIE, GenericIE, + TEDIE, ) @@ -98,7 +99,7 @@ class TestPlaylists(unittest.TestCase): result = ie.extract('http://www.ustream.tv/channel/young-americans-for-liberty') self.assertIsPlaylist(result) self.assertEqual(result['id'], '5124905') - self.assertTrue(len(result['entries']) >= 11) + self.assertTrue(len(result['entries']) >= 6) def test_soundcloud_set(self): dl = FakeYDL() @@ -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()