aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_dailymotion_subtitles.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-10-15 02:00:53 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-10-15 02:00:55 +0200
commit44a5f1718a5657a08082d8fd3201403bf2683c4f (patch)
tree97b83864087d2b6fd3696f785a764389b86d4d66 /test/test_dailymotion_subtitles.py
parenta623df4c7b099bc3adfe943c7155e55c6512aeff (diff)
downloadyoutube-dl-44a5f1718a5657a08082d8fd3201403bf2683c4f.zip
youtube-dl-44a5f1718a5657a08082d8fd3201403bf2683c4f.tar.gz
youtube-dl-44a5f1718a5657a08082d8fd3201403bf2683c4f.tar.bz2
Simplify tests
* Make them directly executable again * Move common stuff (md5, parameters) to helper * Never import * * General clean up
Diffstat (limited to 'test/test_dailymotion_subtitles.py')
-rw-r--r--test/test_dailymotion_subtitles.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/test_dailymotion_subtitles.py b/test/test_dailymotion_subtitles.py
index e655d28..c596415 100644
--- a/test/test_dailymotion_subtitles.py
+++ b/test/test_dailymotion_subtitles.py
@@ -1,18 +1,16 @@
#!/usr/bin/env python
+# Allow direct execution
+import os
import sys
import unittest
-import hashlib
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-# Allow direct execution
-import os
-sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+from test.helper import FakeYDL, global_setup, md5
+global_setup()
-from youtube_dl.extractor import DailymotionIE
-from youtube_dl.utils import *
-from .helper import FakeYDL
-md5 = lambda s: hashlib.md5(s.encode('utf-8')).hexdigest()
+from youtube_dl.extractor import DailymotionIE
class TestDailymotionSubtitles(unittest.TestCase):
def setUp(self):