PYTHON
This commit is contained in:
@@ -36,8 +36,8 @@ def test_event_emission() -> None:
|
||||
|
||||
def test_send_emits_events_proper() -> None:
|
||||
ai_client.reset_session()
|
||||
with patch("ai_client._ensure_gemini_client"), \
|
||||
patch("ai_client._gemini_client") as mock_client:
|
||||
with patch("src.ai_client._ensure_gemini_client"), \
|
||||
patch("src.ai_client._gemini_client") as mock_client:
|
||||
mock_chat = MagicMock()
|
||||
mock_client.chats.create.return_value = mock_chat
|
||||
mock_response = MagicMock()
|
||||
@@ -57,9 +57,9 @@ def test_send_emits_events_proper() -> None:
|
||||
|
||||
def test_send_emits_tool_events() -> None:
|
||||
ai_client.reset_session() # Clear caches and chats to avoid test pollution
|
||||
with patch("ai_client._ensure_gemini_client"), \
|
||||
patch("ai_client._gemini_client") as mock_client, \
|
||||
patch("mcp_client.dispatch") as mock_dispatch:
|
||||
with patch("src.ai_client._ensure_gemini_client"), \
|
||||
patch("src.ai_client._gemini_client") as mock_client, \
|
||||
patch("src.mcp_client.dispatch") as mock_dispatch:
|
||||
mock_chat = MagicMock()
|
||||
mock_client.chats.create.return_value = mock_chat
|
||||
# 1. Setup mock response with a tool call
|
||||
|
||||
Reference in New Issue
Block a user