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
+9 -11
View File
@@ -33,20 +33,18 @@ def test_proxy_lists_and_calls_upstream_tools() -> None:
assert "fixture.personal.echo_tool" in names
connections_result = await client.call_tool("wf.admin.list_connections")
assert structured(connections_result) == {
"result": [
{
"id": "fixture.personal",
"server": "fixture",
"account": "personal",
"enabled": True,
"metadata": {
connections = structured(connections_result)["result"]
assert len(connections) == 1
connection = connections[0]
assert connection["id"] == "fixture.personal"
assert connection["server"] == "fixture"
assert connection["account"] == "personal"
assert connection["enabled"] is True
assert connection["source_config_ownership"] == "locked"
assert connection["metadata"] == {
"transport": "stdio",
"command": sys.executable,
"args": [fixture_server_path()],
},
}
]
}
result = await client.call_tool(
@@ -37,6 +37,9 @@ class FakeRegistryProvider:
def config_source_ids(self) -> set[str]:
return {"github.work"}
def config_source_ownership(self) -> dict[str, str]:
return {"github.work": "locked"}
class FakeMutationProvider:
def __init__(self) -> None: