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

Method test_resources_read

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

Source from the content-addressed store, hash-verified

122
123 @pytest.mark.asyncio
124 async def test_resources_read(self):
125 bridge, tm = _make_bridge()
126 msg = json.dumps(
127 {
128 "jsonrpc": "2.0",
129 "id": 3,
130 "method": "resources/read",
131 "params": {"uri": "ui://test/data.json"},
132 }
133 )
134
135 resp = await bridge.handle_message(msg)
136 parsed = json.loads(resp)
137 assert parsed["id"] == 3
138 assert "result" in parsed
139 assert tm.read_resources == [("ui://test/data.json", "test-server")]
140
141 @pytest.mark.asyncio
142 async def test_ui_message(self):

Callers

nothing calls this directly

Calls 2

handle_messageMethod · 0.80
_make_bridgeFunction · 0.70

Tested by

no test coverage detected