From f00cf48ba233a79f62c58be19b3f9914ecdd6e1d Mon Sep 17 00:00:00 2001 From: collhoun <2904yr@mail.ru> Date: Wed, 8 Apr 2026 11:30:41 +0300 Subject: [PATCH] =?UTF-8?q?#5=20=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D1=81=D0=BA=D1=83=D1=8E=20=D1=87=D0=B0=D1=81=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BA=D0=B0=D0=BD=D0=B0=D0=BB=D0=B0=20=D0=BE=D0=B1=D1=89=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F.=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=B8?= =?UTF-8?q?=D0=B2=D0=B5=D0=BD=D1=82=D1=8B=20=D0=B0=D0=B3=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_models.py | 5 +++++ 1 file changed, 5 insertions(+) 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"},