Skip to content

Commit f33cdc6

Browse files
chore: ensure API key env var doesn't affect tests (#98)
### what ensure there's no STACKLET_API_KEY set in env during tests ### why isolate tests better ### testing current tests ### docs n/a
1 parent 5e824d7 commit f33cdc6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ def requests_adapter() -> Iterator[requests_mock.Adapter]:
1818
yield adapter
1919

2020

21+
@pytest.fixture(autouse=True)
22+
def ensure_no_stacklet_api_key_env(monkeypatch) -> None:
23+
"""Ensure STACKLET_API_KEY doesn't come set from the env during tests."""
24+
monkeypatch.delenv("STACKLET_API_KEY", raising=False)
25+
26+
2127
@pytest.fixture(autouse=True)
2228
def default_stacklet_dir(tmp_path_factory) -> Iterator[Path]:
2329
"""A default .stacklet directory for testing."""

0 commit comments

Comments
 (0)