From f7a8e74b03a8b9c2f29efa9656df5bbea2199b69 Mon Sep 17 00:00:00 2001 From: Ed Summers Date: Wed, 19 Jun 2024 17:23:19 -0400 Subject: [PATCH] Getting Dimensions tests to work --- rialto_airflow/harvest/dimensions.py | 4 ++-- test/harvest/test_dimensions.py | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/rialto_airflow/harvest/dimensions.py b/rialto_airflow/harvest/dimensions.py index 01633a9..fb50c73 100644 --- a/rialto_airflow/harvest/dimensions.py +++ b/rialto_airflow/harvest/dimensions.py @@ -11,8 +11,8 @@ dotenv.load_dotenv() dimcli.login( - os.environ.get("DIMENSIONS_API_USER"), - os.environ.get("DIMENSIONS_API_PASS"), + os.environ.get("AIRFLOW_VAR_DIMENSIONS_API_USER"), + os.environ.get("AIRFLOW_VAR_DIMENSIONS_API_PASS"), "https://app.dimensions.ai", ) diff --git a/test/harvest/test_dimensions.py b/test/harvest/test_dimensions.py index e28caf9..8c0c164 100644 --- a/test/harvest/test_dimensions.py +++ b/test/harvest/test_dimensions.py @@ -7,8 +7,8 @@ dotenv.load_dotenv() -dimensions_user = os.environ.get("DIMENSIONS_API_USER") -dimensions_password = os.environ.get("DIMENSIONS_API_PASS") +dimensions_user = os.environ.get("AIRFLOW_VAR_DIMENSIONS_API_USER") +dimensions_password = os.environ.get("AIRFLOW_VAR_DIMENSIONS_API_PASS") no_auth = not (dimensions_user and dimensions_password) @@ -16,9 +16,7 @@ @pytest.mark.skipif(no_auth, reason="no dimensions key") def test_dimensions_doi_orcids_dict(tmpdir): pickle_file = tmpdir / "dimensions.pickle" - dimensions_doi_orcids_dict( - "data/rialto_app/authors_2024-03-18.csv", pickle_file, limit=5 - ) + dimensions_doi_orcids_dict("test/data/orcids.csv", pickle_file, limit=5) assert pickle_file.isfile() with open(pickle_file, "rb") as handle: