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

Method test_to_dict

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

Source from the content-addressed store, hash-verified

285 """Test ResponseMessage"""
286
287 def test_to_dict(self) -> None:
288 msg = ResponseMessage(
289 id="req-789",
290 success=True,
291 data={"isPlaying": False, "isCompiling": False},
292 )
293 d = msg.to_dict()
294
295 assert d["type"] == "RESPONSE"
296 assert d["id"] == "req-789"
297 assert d["success"] is True
298 assert d["data"]["isPlaying"] is False
299
300
301class TestErrorMessage:

Callers

nothing calls this directly

Calls 2

ResponseMessageClass · 0.90
to_dictMethod · 0.45

Tested by

no test coverage detected