]> Raphaƫl G. Git Repositories - youtubedl/blob - test/test_youtube_playlist_ids.py
Imported Upstream version 2012.12.11
[youtubedl] / test / test_youtube_playlist_ids.py
1 #!/usr/bin/env python
2
3 import sys
4 import unittest
5
6 # Allow direct execution
7 import os
8 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
9
10 from youtube_dl.InfoExtractors import YoutubeIE, YoutubePlaylistIE
11
12 class TestYoutubePlaylistMatching(unittest.TestCase):
13 def test_playlist_matching(self):
14 self.assertTrue(YoutubePlaylistIE().suitable(u'ECUl4u3cNGP61MdtwGTqZA0MreSaDybji8'))
15 self.assertTrue(YoutubePlaylistIE().suitable(u'PL63F0C78739B09958'))
16 self.assertFalse(YoutubePlaylistIE().suitable(u'PLtS2H6bU1M'))
17
18 def test_youtube_matching(self):
19 self.assertTrue(YoutubeIE().suitable(u'PLtS2H6bU1M'))
20
21 if __name__ == '__main__':
22 unittest.main()