refactor(api): build list, search and session services through one launch_served

This commit is contained in:
imSp4rky
2026-11-29 14:28:47 -07:00
parent e41760c2b3
commit de2ffcb9bd
22 changed files with 444 additions and 280 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ class _FakeService:
def run_list_tracks(monkeypatch: pytest.MonkeyPatch, titles: list[Episode], **data: Any) -> dict[str, Any]:
"""Drive list_tracks_handler end to end with the service layer stubbed out."""
monkeypatch.setattr(handlers, "validate_service", lambda tag, request=None: "FAKE")
monkeypatch.setattr(handlers, "setup_list_service", lambda *a, **kw: _FakeService(titles))
monkeypatch.setattr(handlers, "launch_served", lambda *a, **kw: handlers.Launched(_FakeService(titles), None, None))
payload = {"service": "FAKE", "title_id": "t1", **data}
try:
response = asyncio.run(handlers.list_tracks_handler(payload))