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

Function _make_context

tests/agents/test_loop.py:19–27  ·  view source on GitHub ↗

Return a mock ChatContext.

(agent_id: str = "test-agent")

Source from the content-addressed store, hash-verified

17
18
19def _make_context(agent_id: str = "test-agent"):
20 """Return a mock ChatContext."""
21 ctx = MagicMock()
22 ctx.agent_id = agent_id
23 ctx.exit_requested = False
24 ctx.conversation_history = []
25 ctx.dashboard_bridge = None
26 ctx.add_user_message = AsyncMock()
27 return ctx
28
29
30def _make_ui(agent_id: str = "test-agent"):

Calls

no outgoing calls

Tested by

no test coverage detected