fix(types): T7 — eliminate all remaining 38 mypy errors; fix DeckyRow subscript in engine tests
This commit is contained in:
@@ -80,8 +80,8 @@ async def test_update_persists_validated_cfg_no_recreate_on_save(
|
||||
rows = await repo.list_topology_deckies(
|
||||
topology_with_ssh_decky["topology_id"]
|
||||
)
|
||||
row = next(r for r in rows if r["uuid"] == topology_with_ssh_decky["decky_uuid"])
|
||||
cfg_blob = row["decky_config"]
|
||||
row = next(r for r in rows if r.uuid == topology_with_ssh_decky["decky_uuid"])
|
||||
cfg_blob = row.decky_config
|
||||
if isinstance(cfg_blob, str):
|
||||
cfg_blob = json.loads(cfg_blob)
|
||||
assert cfg_blob["service_config"]["ssh"] == {"password": "hunter2"}
|
||||
|
||||
@@ -18,9 +18,9 @@ async def _get_topology_decky(repo, decky_uuid: str) -> dict[str, Any]:
|
||||
# Iterate all topologies' deckies — fine for tests with one row.
|
||||
topologies = await repo.list_topologies()
|
||||
for t in topologies:
|
||||
for d in await repo.list_topology_deckies(t["id"]):
|
||||
if d.get("uuid") == decky_uuid:
|
||||
return d
|
||||
for d in await repo.list_topology_deckies(t.id):
|
||||
if d.uuid == decky_uuid:
|
||||
return d.model_dump()
|
||||
raise AssertionError(f"decky {decky_uuid!r} not found in any topology")
|
||||
|
||||
from decnet.bus.fake import FakeBus
|
||||
|
||||
Reference in New Issue
Block a user