[test/test_socks] Add tests for SOCKS proxies

This commit is contained in:
Yen Chi Hsuan 2016-04-23 21:30:44 +08:00
parent 71aff18809
commit 72f3289ac4
No known key found for this signature in database
GPG key ID: 3FDDD575826C5C30
5 changed files with 79 additions and 1 deletions

View file

@ -24,8 +24,13 @@ from youtube_dl.utils import (
def get_params(override=None):
PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"parameters.json")
LOCAL_PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"local_parameters.json")
with io.open(PARAMETERS_FILE, encoding='utf-8') as pf:
parameters = json.load(pf)
if os.path.exists(LOCAL_PARAMETERS_FILE):
with io.open(LOCAL_PARAMETERS_FILE, encoding='utf-8') as pf:
parameters.update(json.load(pf))
if override:
parameters.update(override)
return parameters