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

Method test_error_response

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

Source from the content-addressed store, hash-verified

152 assert "error" not in d
153
154 def test_error_response(self) -> None:
155 msg = RegisteredMessage(
156 success=False,
157 error={"code": "PROTOCOL_VERSION_MISMATCH", "message": "Unsupported version"},
158 )
159 d = msg.to_dict()
160
161 assert d["success"] is False
162 assert d["error"]["code"] == "PROTOCOL_VERSION_MISMATCH"
163
164
165class TestStatusMessage:

Callers

nothing calls this directly

Calls 2

RegisteredMessageClass · 0.90
to_dictMethod · 0.45

Tested by

no test coverage detected