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

Method test_to_dict

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

Source from the content-addressed store, hash-verified

320 """Test InstancesMessage"""
321
322 def test_to_dict(self) -> None:
323 msg = InstancesMessage(
324 id="req-list",
325 success=True,
326 data={
327 "instances": [
328 {
329 "instance_id": "/Users/dev/MyGame",
330 "project_name": "MyGame",
331 "status": "ready",
332 "is_default": True,
333 }
334 ]
335 },
336 )
337 d = msg.to_dict()
338
339 assert d["type"] == "INSTANCES"
340 assert d["success"] is True
341 assert len(d["data"]["instances"]) == 1
342
343
344class TestFraming:

Callers

nothing calls this directly

Calls 2

InstancesMessageClass · 0.90
to_dictMethod · 0.45

Tested by

no test coverage detected