move credentials to environment variables, defined in main
This commit is contained in:
parent
305f485a23
commit
76a79c11b2
2 changed files with 13 additions and 9 deletions
8
main.py
8
main.py
|
|
@ -1,3 +1,4 @@
|
|||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
|
|
@ -17,6 +18,13 @@ TESTS_DIR = Path("./tests").resolve()
|
|||
# os.environ["PWDEBUG"] = "1"
|
||||
os.environ["TESTS_DIR"] = str(TESTS_DIR)
|
||||
|
||||
cred_file = Path("credentials.json")
|
||||
with open(cred_file, "r") as f:
|
||||
CREDENTIALS = json.load(f)
|
||||
|
||||
os.environ["ADMIN_USER"] = CREDENTIALS["admin_user"]
|
||||
os.environ["ADMIN_PASS"] = CREDENTIALS["admin_pass"]
|
||||
|
||||
|
||||
session_id = get_session_id()
|
||||
wrapper = Wrapper(ENV_FILES, session_id=session_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue