Skip to content

Commit 28f7777

Browse files
committed
mock api
1 parent 7c96f72 commit 28f7777

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

hud/mcp/tests/test_openai.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ async def test_create_initial_messages(self, mock_mcp_client):
6161
assert messages[0]["screenshot"] == "base64data"
6262

6363
@pytest.mark.asyncio
64-
async def test_format_tool_results(self, mock_mcp_client):
64+
async def test_format_tool_results(self, mock_mcp_client, mock_openai):
6565
"""Test formatting tool results."""
66-
agent = OpenAIMCPAgent(mcp_client=mock_mcp_client)
66+
agent = OpenAIMCPAgent(mcp_client=mock_mcp_client, model_client=mock_openai)
6767

6868
tool_calls = [
6969
MCPToolCall(name="test_tool", arguments={}, call_id="call_123"), # type: ignore
@@ -90,9 +90,9 @@ async def test_format_tool_results(self, mock_mcp_client):
9090
) # Should extract screenshot from second result
9191

9292
@pytest.mark.asyncio
93-
async def test_format_tool_results_with_error(self, mock_mcp_client):
93+
async def test_format_tool_results_with_error(self, mock_mcp_client, mock_openai):
9494
"""Test formatting tool results with errors."""
95-
agent = OpenAIMCPAgent(mcp_client=mock_mcp_client)
95+
agent = OpenAIMCPAgent(mcp_client=mock_mcp_client, model_client=mock_openai)
9696

9797
tool_calls = [
9898
MCPToolCall(name="failing_tool", arguments={}, call_id="call_error"), # type: ignore

0 commit comments

Comments
 (0)