aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_playlists.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test_playlists.py b/test/test_playlists.py
index 9d522b357..3229823b6 100644
--- a/test/test_playlists.py
+++ b/test/test_playlists.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# encoding: utf-8
-
# Allow direct execution
import os
import sys
@@ -30,6 +29,7 @@ from youtube_dl.extractor import (
SmotriUserIE,
IviCompilationIE,
ImdbListIE,
+ KhanAcademyIE,
)
@@ -198,6 +198,16 @@ class TestPlaylists(unittest.TestCase):
self.assertEqual(result['title'], u'Animated and Family Films')
self.assertTrue(len(result['entries']) >= 48)
+ def test_khanacademy_topic(self):
+ dl = FakeYDL()
+ ie = KhanAcademyIE(dl)
+ result = ie.extract('https://www.khanacademy.org/math/applied-math/cryptography')
+ self.assertIsPlaylist(result)
+ self.assertEqual(result['id'], u'cryptography')
+ self.assertEqual(result['title'], u'Journey into cryptography')
+ self.assertEqual(result['description'], u'How have humans protected their secret messages through history? What has changed today?')
+ self.assertTrue(len(result['entries']) >= 3)
+
if __name__ == '__main__':
unittest.main()