Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/test_integration_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def test_client_raises_without_key(self, monkeypatch: pytest.MonkeyPatch) -> Non
"""Client should raise ConfigurationError when no API key exists."""
monkeypatch.delenv("BG_API_KEY", raising=False)
# Patch _load_api_key to ensure no config file fallback
monkeypatch.setattr(Configuration, "_load_api_key", lambda _self: None)
with pytest.raises(ConfigurationError):
Client(api_key=None)

Expand All @@ -105,6 +106,7 @@ def test_whitespace_only_api_key_rejected(
) -> None:
"""Whitespace-only API key should be rejected by Client."""
monkeypatch.delenv("BG_API_KEY", raising=False)
monkeypatch.setattr(Configuration, "_load_api_key", lambda _self: None)
with pytest.raises(ConfigurationError):
Client(api_key=" ")

Expand Down
Loading