use load_json_to_environ

This commit is contained in:
Daniel 2023-12-11 15:43:34 +01:00
parent 8868408793
commit aba66158a1

View file

@ -1,10 +1,10 @@
import json
import os
import subprocess
from pathlib import Path
import pytest
from pytest_abra.utils import load_json_to_environ
@pytest.fixture(scope="session")
def session_tmp_path_testout(tmp_path_factory: pytest.TempPathFactory) -> Path:
@ -18,11 +18,7 @@ def test_abratest_cli_full_integration(session_tmp_path_testout: Path):
# --------------------- load credentials to env variables -------------------- #
cred_file = Path("credentials.json")
with open(cred_file, "r") as f:
CREDENTIALS = json.load(f)
for key, value in CREDENTIALS.items():
os.environ[key] = value
load_json_to_environ(cred_file)
# --------------------------------- env files -------------------------------- #