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
|
|
@ -12,6 +12,7 @@ from app.adapters.spotify.errors import SpotifyAuthenticationError
|
|||
from app.adapters.spotify.session import SessionStore, SpotifySession
|
||||
from app.api.routes import SESSION_COOKIE_NAME
|
||||
from app.api.schemas import StreamEvent
|
||||
from app.config import AppMode, Settings
|
||||
from app.domain.models import ConversationTurn, CreatedPlaylist, PreviousRecommendation, Track
|
||||
from app.main import create_app
|
||||
from app.pipeline.event import PipelineDoneEvent, PipelineMetadataEvent, PipelineTrackEvent
|
||||
|
|
@ -81,8 +82,13 @@ def test_recommendations_stream_lines_validate_against_frozen_schemas(
|
|||
assert [event.type for event in events] == ["metadata", "track", "done"]
|
||||
|
||||
|
||||
def test_recommendations_require_a_valid_session_without_seed() -> None:
|
||||
with TestClient(create_app()) as client:
|
||||
def test_live_recommendations_require_a_valid_session_without_seed() -> None:
|
||||
application_settings = Settings(
|
||||
app_mode=AppMode.LIVE,
|
||||
spotify_client_id="client-id",
|
||||
anthropic_api_key="test-key",
|
||||
)
|
||||
with TestClient(create_app(application_settings)) as client:
|
||||
response = client.post(
|
||||
"/api/recommendations",
|
||||
json={"schema_version": 1, "query": "focused electronic music"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue