MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / test_to_dict

Method test_to_dict

tests/test_protocol.py:239–252  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

237 """Test CommandMessage"""
238
239 def test_to_dict(self) -> None:
240 msg = CommandMessage(
241 id="req-456",
242 command="manage_editor",
243 params={"action": "play"},
244 timeout_ms=30000,
245 )
246 d = msg.to_dict()
247
248 assert d["type"] == "COMMAND"
249 assert d["id"] == "req-456"
250 assert d["command"] == "manage_editor"
251 assert d["params"] == {"action": "play"}
252 assert d["timeout_ms"] == 30000
253
254
255class TestRequestMessage:

Callers

nothing calls this directly

Calls 2

CommandMessageClass · 0.90
to_dictMethod · 0.45

Tested by

no test coverage detected