Skip to content

Commit 29ae6ff

Browse files
committed
fix(tests): fixed schema test validation failure
1 parent 18c15b0 commit 29ae6ff

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

tests/test_mcp_server.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,16 @@ async def test_handle_list_tools():
142142
assert "action_json" in properties
143143
assert "wait_for_seconds" in properties
144144
# Check type field has all the command types
145-
type_properties = properties["action_json"]["anyOf"]
146-
type_refs = set(p["$ref"].split("/")[-1] for p in type_properties)
145+
type_properties = tool.inputSchema["$defs"]["ActionJsonSchema"][
146+
"properties"
147+
]
148+
type_refs = set(type_properties)
147149
required_types = {
148-
"Command",
149-
"StatusCheck",
150-
"SendText",
151-
"SendSpecials",
152-
"SendAscii",
150+
"command",
151+
"status_check",
152+
"send_text",
153+
"send_specials",
154+
"send_ascii",
153155
}
154156
assert required_types.issubset(type_refs)
155157
elif tool.name == "FileWriteOrEdit":

0 commit comments

Comments
 (0)