Skip to content

Commit

Permalink
removed unused fixtures from conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
charlottekostelic committed Oct 30, 2024
1 parent 4c11953 commit 68ef57f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def mock_connect_to_server(self, username, password):


@pytest.fixture
def mock_vendor_creds(monkeypatch) -> str:
def mock_vendor_creds() -> str:
vendors = ["NSDROP", "EASTVIEW", "LEILA", "MIDWEST_NYPL", "BAKERTAYLOR_BPL"]
env = {"LOGGLY_TOKEN": "foo"}
for vendor in vendors:
Expand All @@ -139,10 +139,10 @@ def mock_vendor_creds(monkeypatch) -> str:


@pytest.fixture
def mock_open_file(mock_vendor_creds, mocker, monkeypatch) -> None:
def mock_open_file(mock_vendor_creds, mocker) -> None:
m = mocker.mock_open(read_data=mock_vendor_creds)
mocker.patch("vendor_file_cli.utils.open", m)
monkeypatch.setenv("USERPROFILE", "test")
mocker.patch("os.path.exists", lambda *args, **kwargs: True)


@pytest.fixture
Expand All @@ -152,7 +152,6 @@ def unset_env_var(monkeypatch, mock_vendor_creds) -> None:
for var in env_vars:
if any(key in var for key in keys):
monkeypatch.delenv(var, raising=False)
monkeypatch.setenv("USERPROFILE", "test")


@pytest.fixture
Expand Down Expand Up @@ -206,7 +205,6 @@ def build_sheet(*args, **kwargs):
return MockResource()

caplog.set_level(logging.DEBUG)
monkeypatch.setenv("USERPROFILE", "test")
monkeypatch.setattr("googleapiclient.discovery.build", build_sheet)
monkeypatch.setattr("googleapiclient.discovery.build_from_document", build_sheet)
monkeypatch.setattr(
Expand Down

0 comments on commit 68ef57f

Please sign in to comment.