feat: add key-free demo mode replaying recorded fixtures
This commit is contained in:
parent
0664cc2d27
commit
401a0ddea7
21 changed files with 1040 additions and 31 deletions
|
|
@ -22,8 +22,14 @@ def test_anthropic_client_uses_configured_timeout(monkeypatch: pytest.MonkeyPatc
|
|||
constructor = Mock(return_value=anthropic_client)
|
||||
monkeypatch.setattr("app.main.AsyncAnthropic", constructor)
|
||||
|
||||
with TestClient(create_app(Settings(llm_timeout_seconds=42.0))) as client:
|
||||
live_settings = Settings(
|
||||
app_mode="live",
|
||||
spotify_client_id="client-id",
|
||||
anthropic_api_key="api-key",
|
||||
llm_timeout_seconds=42.0,
|
||||
)
|
||||
with TestClient(create_app(live_settings)) as client:
|
||||
response = client.get("/api/health")
|
||||
|
||||
assert response.status_code == 200
|
||||
constructor.assert_called_once_with(api_key="unused-demo-key", timeout=42.0, http_client=None)
|
||||
constructor.assert_called_once_with(api_key="api-key", timeout=42.0, http_client=None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue