import pytest
import dotenv
import sys, copy, os, re
sys.path.extend(["./pythonpath/", "../pythonpath/"])
dotenv.load_dotenv()
import httprequests
httprequests.update_headers("pytest/"+pytest.__version__, "2.x-dev")
@pytest.fixture(scope="module")
def params(request, **kw):
test = re.sub("^\w+/|\.py$", "", request.node.name)
p = copy.copy({
"lang": "en",
"from": "auto",
"quick": 0,
"quick": 0,
"debug": 1,
"mode": "page",
"backend": "custom",
"api_key": os.environ.get(test.upper()),
#"email": "",
#"cmd": "",
"_test_name": request.node.name,
})
p.update(kw)
return p
import translationbackends as tb