projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ff08984
)
adding metacafe test
author
gcmalloc
<gcmalloc@gmail.com>
Wed, 3 Oct 2012 12:47:12 +0000
(14:47 +0200)
committer
gcmalloc
<gcmalloc@gmail.com>
Fri, 12 Oct 2012 18:25:22 +0000
(20:25 +0200)
test/test_download.py
patch
|
blob
|
history
diff --git
a/test/test_download.py
b/test/test_download.py
index b90ce63233142de1b2a0b8b5f9a12c7064891913..871591a53c5472bbfccf7b5a5291fd94fcb3c779 100644
(file)
--- a/
test/test_download.py
+++ b/
test/test_download.py
@@
-4,7
+4,7
@@
import hashlib
import os
from youtube_dl.FileDownloader import FileDownloader
import os
from youtube_dl.FileDownloader import FileDownloader
-from youtube_dl.InfoExtractors import YoutubeIE, DailymotionIE
+from youtube_dl.InfoExtractors import YoutubeIE, DailymotionIE
, MetacafeIE
class DownloadTest(unittest.TestCase):
#calculated with md5sum:
class DownloadTest(unittest.TestCase):
#calculated with md5sum:
@@
-17,6
+17,11
@@
class DownloadTest(unittest.TestCase):
DAILYMOTION_URL = "http://www.dailymotion.com/video/x33vw9_tutoriel-de-youtubeur-dl-des-video_tech"
DAILYMOTION_FILE = ""
DAILYMOTION_URL = "http://www.dailymotion.com/video/x33vw9_tutoriel-de-youtubeur-dl-des-video_tech"
DAILYMOTION_FILE = ""
+
+ METACAFE_MD5 = ""
+ METACAFE_URL = "http://www.metacafe.com/watch/yt-bV9L5Ht9LgY/download_youtube_playlist_with_youtube_dl/"
+ METACAFE_FILE = ""
+
def test_youtube(self):
#let's download a file from youtube
fd = FileDownloader({})
def test_youtube(self):
#let's download a file from youtube
fd = FileDownloader({})
@@
-35,6
+40,14
@@
class DownloadTest(unittest.TestCase):
self.assertEqual(md5_down_file, DownloadTest.DAILYMOTION_MD5)
self.assertEqual(md5_down_file, DownloadTest.DAILYMOTION_MD5)
+ def test_metacafe(self):
+ fd = FileDownloader({})
+ fd.add_info_extractor(MetacafeIE())
+ fd.download([DownloadTest.METACAFE_URL])
+ self.assertTrue(os.path.exists(DownloadTest.METACAFE_FILE))
+ md5_down_file = md5_for_file(DownloadTest.METACAFE_FILE)
+ self.assertEqual(md5_down_file, DownloadTest.METACAFE_MD5)
+
def cleanUp(self):
if os.path.exists(DownloadTest.YOUTUBE_FILE):
os.remove(DownloadTest.YOUTUBE_FILE)
def cleanUp(self):
if os.path.exists(DownloadTest.YOUTUBE_FILE):
os.remove(DownloadTest.YOUTUBE_FILE)