MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_stream_execute_tools_result_fields

Function test_stream_execute_tools_result_fields

tests/tools/test_execution.py:346–361  ·  view source on GitHub ↗

Test CTPToolResult has expected fields.

()

Source from the content-addressed store, hash-verified

344
345@pytest.mark.asyncio
346async def test_stream_execute_tools_result_fields():
347 """Test CTPToolResult has expected fields."""
348 manager = MockToolManager()
349 calls = [CTPToolCall(id="call_1", tool="test_tool", arguments={})]
350
351 results = []
352 async for result in stream_execute_tools(manager, calls):
353 results.append(result)
354
355 result = results[0]
356 assert result.id == "call_1"
357 assert result.tool == "test_tool"
358 assert isinstance(result.start_time, datetime)
359 assert isinstance(result.end_time, datetime)
360 assert result.machine # Should have hostname
361 assert result.pid > 0 # Should have process ID
362
363
364# ----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

stream_execute_toolsFunction · 0.90
MockToolManagerClass · 0.70

Tested by

no test coverage detected