diff --git a/tests/test_models.py b/tests/test_models.py index 005e56a..bbb91c9 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -33,6 +33,9 @@ def test_client_message_invalid(data): [ ({"type": "STATUS"}, MsgStatus), ({"type": "AGENT_EVENT_TEXT_CHUNK", "text": "hi"}, MsgEventTextChunk), + ({"type": "AGENT_EVENT_TOOL_CALL_CHUNK", "tool_name": "search", "args_chunk": "{\"q\": \"hello\"}"}, MsgEventToolCallChunk), + ({"type": "AGENT_EVENT_TOOL_RESULT", "tool_name": "search", "result": {"items": [1, 2, 3]}}, MsgEventToolResult), + ({"type": "AGENT_EVENT_CUSTOM_UPDATE", "payload": {"status": "in_progress", "progress": 50}}, MsgEventCustomUpdate), ({"type": "AGENT_EVENT_END", "tokens_used": 10}, MsgEventEnd), ({"type": "ERROR", "code": "E1", "details": "fail"}, MsgError), ({"type": "GRACEFUL_DISCONNECT"}, MsgGracefulDisconnect), @@ -47,6 +50,8 @@ def test_server_message_valid(data, expected_type): "data", [ {"type": "AGENT_EVENT_TEXT_CHUNK"}, # нет text + {"type": "AGENT_EVENT_TOOL_RESULT", "tool_name": "search"}, # нет result + {"type": "AGENT_EVENT_CUSTOM_UPDATE"}, # нет payload {"type": "AGENT_EVENT_END"}, # нет tokens_used {"type": "ERROR", "code": "E1"}, # нет details {"type": "UNKNOWN"},