refactor: use thin upstream transport adapter
This commit is contained in:
parent
569824ead1
commit
0c2884c2b1
8 changed files with 420 additions and 255 deletions
|
|
@ -911,9 +911,9 @@ async def test_build_runtime_uses_real_platform_when_matrix_backend_is_real(monk
|
|||
bot_module = importlib.import_module("adapter.matrix.bot")
|
||||
|
||||
class FakeAgentApiWrapper:
|
||||
def __init__(self, agent_id: str, url: str) -> None:
|
||||
def __init__(self, agent_id: str, base_url: str) -> None:
|
||||
self.agent_id = agent_id
|
||||
self.url = url
|
||||
self.base_url = base_url
|
||||
|
||||
monkeypatch.setattr(bot_module, "AgentApiWrapper", FakeAgentApiWrapper)
|
||||
monkeypatch.setenv("MATRIX_PLATFORM_BACKEND", "real")
|
||||
|
|
@ -922,7 +922,7 @@ async def test_build_runtime_uses_real_platform_when_matrix_backend_is_real(monk
|
|||
runtime = build_runtime()
|
||||
|
||||
assert isinstance(runtime.platform, RealPlatformClient)
|
||||
assert runtime.platform.agent_api.url == "ws://agent.example/agent_ws/"
|
||||
assert runtime.platform.agent_api.base_url == "ws://agent.example/agent_ws/"
|
||||
|
||||
|
||||
async def test_matrix_main_closes_platform_without_connecting_root_agent(monkeypatch):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue