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

Method test_to_dict

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

Source from the content-addressed store, hash-verified

115 assert msg.capabilities == []
116
117 def test_to_dict(self) -> None:
118 msg = RegisterMessage(
119 instance_id="/Users/dev/MyGame",
120 project_name="MyGame",
121 unity_version="2022.3.20f1",
122 capabilities=["manage_editor", "manage_gameobject"],
123 )
124 d = msg.to_dict()
125
126 assert d["type"] == "REGISTER"
127 assert d["protocol_version"] == "1.0"
128 assert d["instance_id"] == "/Users/dev/MyGame"
129 assert d["project_name"] == "MyGame"
130 assert d["unity_version"] == "2022.3.20f1"
131 assert d["capabilities"] == ["manage_editor", "manage_gameobject"]
132 assert "ts" in d
133
134 def test_immutable(self) -> None:
135 from pydantic import ValidationError

Callers

nothing calls this directly

Calls 2

RegisterMessageClass · 0.90
to_dictMethod · 0.45

Tested by

no test coverage detected