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

Method test_error_result

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

Source from the content-addressed store, hash-verified

203 assert d["data"] == {"isPlaying": True}
204
205 def test_error_result(self) -> None:
206 msg = CommandResultMessage(
207 id="req-123",
208 success=False,
209 error={"code": "INVALID_PARAMS", "message": "Unknown action"},
210 )
211 d = msg.to_dict()
212
213 assert d["success"] is False
214 assert d["error"]["code"] == "INVALID_PARAMS"
215
216
217class TestPingPongMessages:

Callers

nothing calls this directly

Calls 2

to_dictMethod · 0.45

Tested by

no test coverage detected