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

Method test_to_dict

tests/test_instance_registry.py:91–109  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

89 assert instance.is_available is False
90
91 def test_to_dict(self) -> None:
92 instance = UnityInstance(
93 instance_id="/Users/dev/MyGame",
94 project_name="MyGame",
95 unity_version="2022.3.20f1",
96 ref_id=5,
97 capabilities=["manage_editor"],
98 status=InstanceStatus.READY,
99 )
100
101 d = instance.to_dict(is_default=True)
102
103 assert d["ref_id"] == 5
104 assert d["instance_id"] == "/Users/dev/MyGame"
105 assert d["project_name"] == "MyGame"
106 assert d["unity_version"] == "2022.3.20f1"
107 assert d["status"] == "ready"
108 assert d["is_default"] is True
109 assert d["capabilities"] == ["manage_editor"]
110
111 def test_update_heartbeat(self) -> None:
112 instance = UnityInstance(

Callers

nothing calls this directly

Calls 2

to_dictMethod · 0.95
UnityInstanceClass · 0.90

Tested by

no test coverage detected