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

Method test_model_context_update

tests/apps/test_bridge.py:159–174  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

157
158 @pytest.mark.asyncio
159 async def test_model_context_update(self):
160 bridge, _ = _make_bridge()
161 msg = json.dumps(
162 {
163 "jsonrpc": "2.0",
164 "id": 5,
165 "method": "ui/update-model-context",
166 "params": {"content": [{"type": "text", "text": "user picked red"}]},
167 }
168 )
169
170 resp = await bridge.handle_message(msg)
171 parsed = json.loads(resp)
172 assert parsed["id"] == 5
173 assert parsed["result"] == {}
174 assert bridge.model_context is not None
175
176 @pytest.mark.asyncio
177 async def test_initialized_notification(self):

Callers

nothing calls this directly

Calls 2

handle_messageMethod · 0.80
_make_bridgeFunction · 0.70

Tested by

no test coverage detected