test: update ownership-aware assertions

This commit is contained in:
lda
2026-06-04 18:42:08 +07:00 Unverified
parent 71a6519658
commit f764b1717f
2 changed files with 15 additions and 14 deletions
+12 -14
View File
@@ -33,20 +33,18 @@ def test_proxy_lists_and_calls_upstream_tools() -> None:
assert "fixture.personal.echo_tool" in names assert "fixture.personal.echo_tool" in names
connections_result = await client.call_tool("wf.admin.list_connections") connections_result = await client.call_tool("wf.admin.list_connections")
assert structured(connections_result) == { connections = structured(connections_result)["result"]
"result": [ assert len(connections) == 1
{ connection = connections[0]
"id": "fixture.personal", assert connection["id"] == "fixture.personal"
"server": "fixture", assert connection["server"] == "fixture"
"account": "personal", assert connection["account"] == "personal"
"enabled": True, assert connection["enabled"] is True
"metadata": { assert connection["source_config_ownership"] == "locked"
"transport": "stdio", assert connection["metadata"] == {
"command": sys.executable, "transport": "stdio",
"args": [fixture_server_path()], "command": sys.executable,
}, "args": [fixture_server_path()],
}
]
} }
result = await client.call_tool( result = await client.call_tool(
@@ -37,6 +37,9 @@ class FakeRegistryProvider:
def config_source_ids(self) -> set[str]: def config_source_ids(self) -> set[str]:
return {"github.work"} return {"github.work"}
def config_source_ownership(self) -> dict[str, str]:
return {"github.work": "locked"}
class FakeMutationProvider: class FakeMutationProvider:
def __init__(self) -> None: def __init__(self) -> None: