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
+2 -1
View File
@@ -21,6 +21,7 @@ import requests
from aiohttp import web
from langcodes import Language
from tests.remote.sessions import stub_service_build
from tests.remote.unit.test_tunnel import wait_until
from unshackle.core import remote_channel, remote_service
from unshackle.core.api import handlers, routes, session_store
@@ -153,7 +154,7 @@ def server(request: pytest.FixtureRequest, monkeypatch: pytest.MonkeyPatch, tmp_
monkeypatch.setattr(handlers, "resolve_handler_proxy", lambda *args: (None, []))
monkeypatch.setattr(handlers, "server_account_for", lambda *args: False)
monkeypatch.setattr(handlers.Services, "load", lambda service: StubService)
monkeypatch.setattr(handlers, "create_service_instance", lambda *a, **k: (StubService(beats), None, None))
stub_service_build(monkeypatch, lambda: StubService(beats))
app = web.Application(middlewares=[record, cors_middleware, no_5xx_middleware, api_key_authentication])
app["config"] = {"users": [KEY]}