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

Method test_calls_callback

tests/dashboard/test_server.py:140–151  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

138class TestHandleBrowserMessage:
139 @pytest.mark.asyncio
140 async def test_calls_callback(self):
141 from mcp_cli.dashboard.server import DashboardServer
142
143 s = DashboardServer()
144 received = []
145
146 async def handler(msg):
147 received.append(msg)
148
149 s.on_browser_message = handler
150 await s._handle_browser_message('{"type":"USER_MESSAGE","content":"hi"}')
151 assert received == [{"type": "USER_MESSAGE", "content": "hi"}]
152
153 @pytest.mark.asyncio
154 async def test_invalid_json_ignored(self):

Callers

nothing calls this directly

Calls 2

DashboardServerClass · 0.90

Tested by

no test coverage detected