Wired-MIDI test: one check, whether or not config.json already has it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 10:10:51 -04:00
co-authored by Claude Opus 5.5
parent 79318976c5
commit 340100b5bb
+2 -1
View File
@@ -474,7 +474,8 @@ class TestChecks(unittest.TestCase):
self.snap.midi["NA Ingest"]["peers"].pop()
self.assertEqual([r.level for _, r in sp.check_midi_wired(chk, self.snap, self.ctx)], [sp.OK])
cfg = json.loads(json.dumps(CONFIG))
next(t for t in cfg["tiles"] if t["id"] == "midi")["checks"].append(dict(chk))
midi = next(t for t in cfg["tiles"] if t["id"] == "midi")
midi["checks"] = [c for c in midi["checks"] if c["type"] != "midi_wired"] + [dict(chk)] # one, wherever it came from
import schema
self.assertEqual([e for e in schema.validate(cfg)[0] if "wired" in e], [])
next(t for t in cfg["tiles"] if t["id"] == "midi")["checks"][-1]["nets"] = ["wifi"]