add test for infoq
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 1 Jan 2013 20:01:49 +0000 (21:01 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 1 Jan 2013 20:01:49 +0000 (21:01 +0100)
test/test_download.py
test/tests.json

index 8b9b833735990ce2655fa7467488d95951f079ae..4a59f6638997df30864337f8473e9138463dbb80 100644 (file)
@@ -90,7 +90,8 @@ def generator(test_case):
             fd.download([test_case['url']])
 
             for tc in test_cases:
-                self.assertTrue(os.path.exists(tc['file']))
+                if not test_case.get('params', {}).get('skip_download', False):
+                    self.assertTrue(os.path.exists(tc['file']))
                 self.assertTrue(os.path.exists(tc['file'] + '.info.json'))
                 if 'md5' in tc:
                     md5_for_file = _file_md5(tc['file'])
index 1d77070339c462e2a870ebae071b6a9aeac51c4a..cd72a88e35ec2ed88d5e1e4fa7f9bf0c80b61392 100644 (file)
     "info_dict": {
         "title": "Young Americans for Liberty February 7, 2012 2:28 AM"
     }
+  },
+  {
+    "name": "InfoQ",
+    "url": "http://www.infoq.com/presentations/A-Few-of-My-Favorite-Python-Things",
+    "file": "12-jan-pythonthings.mp4",
+    "info_dict": {
+      "title": "A Few of My Favorite [Python] Things"
+    },
+    "params": {
+      "skip_download": true
+    }
   }
 ]