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

Method test_basic_init

tests/chat/test_testing.py:82–101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

80 """Test the __init__ path."""
81
82 def test_basic_init(self):
83 from mcp_cli.chat.testing import TestChatContext
84
85 sm = _make_stream_manager()
86 mm = _make_model_manager()
87 ctx = TestChatContext(sm, mm)
88
89 assert ctx.stream_manager is sm
90 assert ctx.model_manager is mm
91 assert ctx.tool_manager is None
92 assert ctx.exit_requested is False
93 assert ctx.tools == []
94 assert ctx.internal_tools == []
95 assert ctx.server_info == []
96 assert ctx.tool_to_server_map == {}
97 assert ctx.openai_tools == []
98 assert ctx.tool_name_mapping == {}
99 assert ctx.tool_processor is None
100 assert isinstance(ctx.conversation_history, list)
101 assert isinstance(ctx._pending_context_notices, list)
102
103 def test_init_uses_model_manager_properties(self):
104 """The debug log line accesses self.provider / self.model."""

Callers

nothing calls this directly

Calls 3

TestChatContextClass · 0.90
_make_stream_managerFunction · 0.85
_make_model_managerFunction · 0.70

Tested by

no test coverage detected