mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-14 09:11:54 +00:00
test(tui-gateway): cover mcp_servers field in _session_info output
This commit is contained in:
parent
202b78ec68
commit
b82ec6419d
1 changed files with 15 additions and 0 deletions
|
|
@ -531,3 +531,18 @@ def test_session_steer_errors_when_agent_has_no_steer_method():
|
|||
assert "error" in resp, resp
|
||||
assert resp["error"]["code"] == 4010
|
||||
|
||||
|
||||
def test_session_info_includes_mcp_servers(monkeypatch):
|
||||
fake_status = [
|
||||
{"name": "github", "transport": "http", "tools": 12, "connected": True},
|
||||
{"name": "filesystem", "transport": "stdio", "tools": 4, "connected": True},
|
||||
{"name": "broken", "transport": "stdio", "tools": 0, "connected": False},
|
||||
]
|
||||
fake_mod = types.ModuleType("tools.mcp_tool")
|
||||
fake_mod.get_mcp_status = lambda: fake_status
|
||||
monkeypatch.setitem(sys.modules, "tools.mcp_tool", fake_mod)
|
||||
|
||||
info = server._session_info(types.SimpleNamespace(tools=[], model=""))
|
||||
|
||||
assert info["mcp_servers"] == fake_status
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue