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:
@@ -474,7 +474,8 @@ class TestChecks(unittest.TestCase):
|
|||||||
self.snap.midi["NA Ingest"]["peers"].pop()
|
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])
|
self.assertEqual([r.level for _, r in sp.check_midi_wired(chk, self.snap, self.ctx)], [sp.OK])
|
||||||
cfg = json.loads(json.dumps(CONFIG))
|
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
|
import schema
|
||||||
self.assertEqual([e for e in schema.validate(cfg)[0] if "wired" in e], [])
|
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"]
|
next(t for t in cfg["tiles"] if t["id"] == "midi")["checks"][-1]["nets"] = ["wifi"]
|
||||||
|
|||||||
Reference in New Issue
Block a user