From 4c119538a9a70c410b4369d5d0eca3a2f60d966d Mon Sep 17 00:00:00 2001 From: Charlotte Kostelic Date: Tue, 29 Oct 2024 15:58:20 -0400 Subject: [PATCH] updated file-retriever and fixed tests (#8) --- poetry.lock | 2 +- tests/conftest.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index 0345ff3..9941214 100644 --- a/poetry.lock +++ b/poetry.lock @@ -445,7 +445,7 @@ types-pyyaml = "^6.0.12.20240311" type = "git" url = "https://github.com/BookOps-CAT/file-retriever.git" reference = "HEAD" -resolved_reference = "405c6d20fb1a5017140b9aa3aeb57168d733d98a" +resolved_reference = "ca38f28f54c509d81c15f3fd460e463992e8a3a5" [[package]] name = "google-api-core" diff --git a/tests/conftest.py b/tests/conftest.py index c0f23ab..054a04d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -142,7 +142,7 @@ def mock_vendor_creds(monkeypatch) -> str: def mock_open_file(mock_vendor_creds, mocker, monkeypatch) -> None: m = mocker.mock_open(read_data=mock_vendor_creds) mocker.patch("vendor_file_cli.utils.open", m) - monkeypatch.setattr("vendor_file_cli.utils.load_creds", lambda *args: None) + monkeypatch.setenv("USERPROFILE", "test") @pytest.fixture @@ -213,6 +213,7 @@ def build_sheet(*args, **kwargs): "google.oauth2.credentials.Credentials.from_authorized_user_file", lambda *args, **kwargs: MockCreds(), ) + monkeypatch.setattr("vendor_file_cli.utils.load_creds", lambda *args: None) @pytest.fixture