diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-10-07 19:06:36 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-10-07 19:06:36 +0200 |
commit | b2ad967e4561f0bcb73fca3281341751471cab91 (patch) | |
tree | f2a252a223efd21bf21227df4f702dc2a5931836 /test/test_download.py | |
parent | a27b9e8bd592c880e65ab6bb3e15e1f5f8727cd8 (diff) |
Simplify test setup
Diffstat (limited to 'test/test_download.py')
-rw-r--r-- | test/test_download.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/test/test_download.py b/test/test_download.py index 23d3853c4..fdf59bb5c 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -19,14 +19,6 @@ PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "para RETRIES = 3 -# General configuration (from __init__, not very elegant...) -jar = compat_cookiejar.CookieJar() -cookie_processor = compat_urllib_request.HTTPCookieProcessor(jar) -proxy_handler = compat_urllib_request.ProxyHandler() -opener = compat_urllib_request.build_opener(proxy_handler, cookie_processor, YoutubeDLHandler()) -compat_urllib_request.install_opener(opener) -socket.setdefaulttimeout(10) - md5 = lambda s: hashlib.md5(s.encode('utf-8')).hexdigest() class YoutubeDL(youtube_dl.YoutubeDL): @@ -45,6 +37,7 @@ def _file_md5(fn): with open(fn, 'rb') as f: return hashlib.md5(f.read()).hexdigest() +import helper # Set up remaining global configuration from helper import get_testcases, try_rm defs = get_testcases() |