(self, registry: InstanceRegistry)
| 359 | assert instance.status == InstanceStatus.BUSY |
| 360 | |
| 361 | def test_list_all(self, registry: InstanceRegistry) -> None: |
| 362 | instance1 = UnityInstance( |
| 363 | instance_id="/first", |
| 364 | project_name="First", |
| 365 | unity_version="2022.3", |
| 366 | status=InstanceStatus.READY, |
| 367 | ) |
| 368 | instance2 = UnityInstance( |
| 369 | instance_id="/second", |
| 370 | project_name="Second", |
| 371 | unity_version="2022.3", |
| 372 | status=InstanceStatus.BUSY, |
| 373 | ) |
| 374 | registry._instances["/first"] = instance1 |
| 375 | registry._instances["/second"] = instance2 |
| 376 | registry._default_instance_id = "/first" |
| 377 | |
| 378 | result = registry.list_all() |
| 379 | |
| 380 | assert len(result) == 2 |
| 381 | # Find the default instance |
| 382 | default_instance = next(d for d in result if d["instance_id"] == "/first") |
| 383 | assert default_instance["is_default"] is True |
| 384 | |
| 385 | def test_get_instance_for_request_with_id(self, registry: InstanceRegistry) -> None: |
| 386 | instance = UnityInstance( |
nothing calls this directly
no test coverage detected