]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
add tests for use_cipher_signature videos (#897) and the ability to test multiple...
authorFilippo Valsorda <filippo.valsorda@gmail.com>
Tue, 25 Jun 2013 12:38:00 +0000 (14:38 +0200)
committerFilippo Valsorda <filippo.valsorda@gmail.com>
Tue, 25 Jun 2013 12:38:00 +0000 (14:38 +0200)
test/test_download.py
test/tests.json

index 9af626dca0cfd5498aea48aef8825e740a87082a..067bde4bb9159f4d56ae34bbc4690a8425a11550 100644 (file)
@@ -153,9 +153,11 @@ def generator(test_case):
     return test_template
 
 ### And add them to TestDownload
-for test_case in defs:
+for n, test_case in enumerate(defs):
     test_method = generator(test_case)
     test_method.__name__ = "test_{0}".format(test_case["name"])
+    if getattr(TestDownload, test_method.__name__, False):
+        test_method.__name__ = "test_{0}_{1}".format(test_case["name"], n)
     setattr(TestDownload, test_method.__name__, test_method)
     del test_method
 
index fd037d818a07d9feab99e00e4bb44a7880ed0ea9..f6a70f153c9e0ec5bbc03c845b89f92ec937a4d6 100644 (file)
       "description": "test chars:  \"'/\\ä↭𝕐\n\nThis is a test video for youtube-dl.\n\nFor more information, contact phihag@phihag.de ."
     }
   },
+  {
+    "name": "Youtube",
+    "url":  "http://www.youtube.com/watch?v=1ltcDfZMA3U",
+    "file":  "1ltcDfZMA3U.flv",
+    "note": "Test VEVO video (#897)",
+    "info_dict": {
+      "upload_date": "20070518",
+      "title": "Maps - It Will Find You",
+      "description": "Music video by Maps performing It Will Find You.",
+      "uploader": "MuteUSA",
+      "uploader_id": "MuteUSA"
+    }
+  },
+  {
+    "name": "Youtube",
+    "url":  "http://www.youtube.com/watch?v=UxxajLWwzqY",
+    "file":  "UxxajLWwzqY.mp4",
+    "note": "Test generic use_cipher_signature video (#897)",
+    "info_dict": {
+      "upload_date": "20120506",
+      "title": "Icona Pop - I Love It (feat. Charli XCX) [OFFICIAL VIDEO]",
+      "description": "md5:b085c9804f5ab69f4adea963a2dceb3c",
+      "uploader": "IconaPop",
+      "uploader_id": "IconaPop"
+    }
+  },
   {
     "name": "Dailymotion",
     "md5":  "392c4b85a60a90dc4792da41ce3144eb",