- def test_youtube_playlist(self):
- DL = FakeDownloader()
- IE = YoutubePlaylistIE(DL)
- IE.extract('https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re')
- self.assertEqual(DL.result, [
- ['http://www.youtube.com/watch?v=bV9L5Ht9LgY'],
- ['http://www.youtube.com/watch?v=FXxLjLQi3Fg'],
- ['http://www.youtube.com/watch?v=tU3Bgo5qJZE']
- ])
-
- def test_youtube_playlist_long(self):
- DL = FakeDownloader()
- IE = YoutubePlaylistIE(DL)
- IE.extract('https://www.youtube.com/playlist?list=UUBABnxM4Ar9ten8Mdjj1j0Q')
- self.assertTrue(len(DL.result) >= 799)
+ def assertIsPlaylist(self, info):
+ """Make sure the info has '_type' set to 'playlist'"""
+ self.assertEqual(info['_type'], 'playlist')