mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
fix: edit ops second review findings
- A group's sunSensor and a shade's flags are refused by name: the routes don't set them. - setPaired needs paired, and without a shade id it is a bad request. - groupOptions' payload is parsed in ProtoEdits (parseReadPayload). - The assembler's mutex is static, so creating it can't fail. - protoIsReadOp and protoIsShadeOp are gone; the tests use protoOpKind. - Native tests for missing(), offeredRemoteAddress and the edit ops against the TYPE table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8fa087aa89
commit
970256e7f6
13 changed files with 107 additions and 34 deletions
|
|
@ -62,6 +62,8 @@ def test_group_options_of_a_missing_group(connect, schema):
|
|||
("saveRoom", {"zz": 1}, "Unknown field zz"),
|
||||
("setPaired", {"s": 1, "i": 2}, "paired is not a boolean (1 or 0)"),
|
||||
("shadeSortOrder", {}, "ids is missing"),
|
||||
("setPaired", {"s": 1}, "paired is missing"),
|
||||
("saveGroup", {"g": 1, "ss": 1}, "sunSensor can't be set by this edit"),
|
||||
])
|
||||
def test_a_bad_payload_is_refused_before_it_is_queued(connect, schema, name, payload, why):
|
||||
c, _, _ = synced_model(connect, schema)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue