forked from kenzuya/unshackle
refactor(api): build list, search and session services through one launch_served
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user