test automation
[youtube-dl] / 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         assert YoutubePlaylistIE().suitable(u'ECUl4u3cNGP61MdtwGTqZA0MreSaDybji8')
15         assert YoutubePlaylistIE().suitable(u'PL63F0C78739B09958')
16         assert not YoutubePlaylistIE().suitable(u'PLtS2H6bU1M')
17
18     def test_youtube_matching(self):
19         assert YoutubeIE().suitable(u'PLtS2H6bU1M')
20
21 if __name__ == '__main__':
22     unittest.main()