From a9626d7080e1e9e124b11d4dadfe6da615837a58 Mon Sep 17 00:00:00 2001 From: Charlotte Kostelic Date: Tue, 5 Nov 2024 10:31:29 -0500 Subject: [PATCH] testing fix to env vars for live tests --- tests/conftest.py | 2 +- tests/test_monthly_check.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 9532720..a1109e9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,7 +14,7 @@ @pytest.fixture def live_keys(): - if os.name == "nt": + if os.name == "nt" and not os.getenv("GITHUB_ACTIONS"): fh = os.path.join(os.environ["USERPROFILE"], ".oclc/nyp_wc_test.json") with open(fh, "r") as file: data = json.load(file) diff --git a/tests/test_monthly_check.py b/tests/test_monthly_check.py index ee022fb..3bccdd4 100644 --- a/tests/test_monthly_check.py +++ b/tests/test_monthly_check.py @@ -9,6 +9,11 @@ from bookops_worldcat import MetadataSession, WorldcatAccessToken +@pytest.fixture +def stub_marc21() -> bytes: + return b"00266nam a2200097 a 4500008004100000010001700041040002200058100002700080245001600107500004500123\x1e120827s2012 nyua 000 0 eng d\x1e \x1fa 63011276 \x1e \x1faOCWMS\x1fbeng\x1fcOCWMS\x1e0 \x1faOCLC Developer Network\x1e10\x1faTest Record\x1e \x1faFOR OCLC DEVELOPER NETWORK DOCUMENTATION\x1e\x1d" + + @pytest.fixture def method_params(): """