diff --git a/tests/test_pytest_abra.py b/tests/test_pytest_abra.py index b87e788..0bc03d8 100644 --- a/tests/test_pytest_abra.py +++ b/tests/test_pytest_abra.py @@ -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 -------------------------------- #