fix(sfm): one guard in front of every /device route -- UM serials 501 off the serial-aware routes, held lines 409 serial-less requests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyJ2ip3Krb6dtdv2cXua44
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-10-21 01:44:35 -04:00
1 parent 6dd34f8fd7
commit 82b91835fb
4 files changed
+109 -1

No files matched your search

+10
View File
@@ -221,3 +221,13 @@ def test_both_series_return_the_same_model_with_the_same_fields(op):
a, b = getattr(s3, name), getattr(s4, name)
if a is not None and b is not None and name != "detail":
assert type(a) is type(b) or {type(a), type(b)} <= {int, float}, name
def test_held_serial_reports_an_open_line_only():
fake = FakeMicromateClient()
da = access(s4=[fake])
assert da.held_serial(ADDR) is None
da.status(ADDR, "UM20147")
assert da.held_serial(ADDR) == "UM20147"
da.hang_up(ADDR)
assert da.held_serial(ADDR) is None