Merge remote-tracking branch 'olebowle/gameone'
[youtube-dl] / test / test_playlists.py
index 4789200e9f2450bc5cd10e4b53e292677b3ad1df..0691ff11063359ad0091a2608896eebf03292269 100644 (file)
@@ -1,6 +1,17 @@
 #!/usr/bin/env python
 # encoding: utf-8
 
+## DEPRECATED FILE!
+# Add new tests to the extractors themselves, like this:
+# _TEST = {
+#    'url': 'http://example.com/playlist/42',
+#    'playlist_mincount': 99,
+#    'info_dict': {
+#        'id': '42',
+#        'title': 'Playlist number forty-two',
+#    }
+# }
+
 from __future__ import unicode_literals
 
 # Allow direct execution
@@ -51,6 +62,7 @@ from youtube_dl.extractor import (
     InstagramUserIE,
     CSpanIE,
     AolIE,
+    GameOnePlaylistIE,
 )
 
 
@@ -154,7 +166,7 @@ class TestPlaylists(unittest.TestCase):
         self.assertEqual(result['id'], '4110309')
         self.assertEqual(result['title'], 'TILT Brass - Bowery Poetry Club, August \'03 [Non-Site SCR 02]')
         assertRegexpMatches(
-            self, result['description'], r'TILT Brass - Bowery Poetry Club')
+            self, result['description'], r'.*?TILT Brass - Bowery Poetry Club')
         self.assertEqual(len(result['entries']), 6)
 
     def test_livestream_event(self):
@@ -193,10 +205,10 @@ class TestPlaylists(unittest.TestCase):
     def test_bandcamp_album(self):
         dl = FakeYDL()
         ie = BandcampAlbumIE(dl)
-        result = ie.extract('http://mpallante.bandcamp.com/album/nightmare-night-ep')
+        result = ie.extract('http://nightbringer.bandcamp.com/album/hierophany-of-the-open-grave')
         self.assertIsPlaylist(result)
-        self.assertEqual(result['title'], 'Nightmare Night EP')
-        assertGreaterEqual(self, len(result['entries']), 4)
+        self.assertEqual(result['title'], 'Hierophany of the Open Grave')
+        assertGreaterEqual(self, len(result['entries']), 9)
         
     def test_smotri_community(self):
         dl = FakeYDL()
@@ -396,5 +408,13 @@ class TestPlaylists(unittest.TestCase):
         self.assertEqual(result['id'], 'rbhagwati2')
         assertGreaterEqual(self, len(result['entries']), 179)
 
+    def test_GameOne_playlist(self):
+        dl = FakeYDL()
+        ie = GameOnePlaylistIE(dl)
+        result = ie.extract('http://www.gameone.de/tv')
+        self.assertIsPlaylist(result)
+        self.assertEqual(result['title'], 'GameOne')
+        assertGreaterEqual(self, len(result['entries']), 294)
+
 if __name__ == '__main__':
     unittest.main()