mirror of
https://github.com/arendst/Tasmota.git
synced 2026-10-26 22:11:22 +00:00
Matter: fix stale host test fixtures (#25161)
run_tests.be and button_stability_tests.be stop with assert_failed right after "Matter epoch conversion for UTC and local time: OK" on development. Three test-only mistakes, each hiding the next: - run_tests.be checked the RSSI item's stored TLV type before encoding. "Clamp RSSI" (#25126) stores signed values as I4; the encoded bytes are still the 1-byte 00C3, which the next assert checks. Check the value only. - TestGarageDevice (run_tests.be) lacks disable_bridge_mode, which Matter_Plugin_Device.init() reads since #25099. - StabilityDevice (button_stability_tests.be) lacks it too. Tests only; no firmware files change. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
81fdbb0bbe
commit
185e41c274
2 files changed
+5
-3
No files matched your search
@@ -74,9 +74,10 @@ def test_button_stability()
|
|||||||
def init() self.im = TestInteractionModel() end
|
def init() self.im = TestInteractionModel() end
|
||||||
end
|
end
|
||||||
class StabilityDevice
|
class StabilityDevice
|
||||||
var events, message_handler, updates
|
var events, message_handler, updates, disable_bridge_mode
|
||||||
def init()
|
def init()
|
||||||
self.updates = 0
|
self.updates = 0
|
||||||
|
self.disable_bridge_mode = false
|
||||||
self.message_handler = TestMessageHandler()
|
self.message_handler = TestMessageHandler()
|
||||||
self.events = MemoryEventHandler(self)
|
self.events = MemoryEventHandler(self)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -206,9 +206,10 @@ class TestGarageEvents
|
|||||||
end
|
end
|
||||||
|
|
||||||
class TestGarageDevice
|
class TestGarageDevice
|
||||||
var tick, events
|
var tick, events, disable_bridge_mode
|
||||||
def init()
|
def init()
|
||||||
self.tick = 1
|
self.tick = 1
|
||||||
|
self.disable_bridge_mode = false
|
||||||
self.events = TestGarageEvents()
|
self.events = TestGarageEvents()
|
||||||
end
|
end
|
||||||
def attribute_updated(endpoint, cluster, attribute, fabric_specific) end
|
def attribute_updated(endpoint, cluster, attribute, fabric_specific) end
|
||||||
@@ -349,7 +350,7 @@ ctx.attribute = 0x0003
|
|||||||
assert(root.read_attribute(session, ctx, TLV.Matter_TLV_item()).val == 6)
|
assert(root.read_attribute(session, ctx, TLV.Matter_TLV_item()).val == 6)
|
||||||
ctx.attribute = 0x0004
|
ctx.attribute = 0x0004
|
||||||
var rssi = root.read_attribute(session, ctx, TLV.Matter_TLV_item())
|
var rssi = root.read_attribute(session, ctx, TLV.Matter_TLV_item())
|
||||||
assert(rssi.typ == 0x00 && rssi.val == -61)
|
assert(rssi.val == -61) # stored as I4 by convention; next line checks the encoded I1
|
||||||
assert(rssi.tlv2raw() == bytes("00C3"))
|
assert(rssi.tlv2raw() == bytes("00C3"))
|
||||||
tasmota.wifi_info['security'] = 'wpa3-enterprise' # unknown mode maps to Unspecified
|
tasmota.wifi_info['security'] = 'wpa3-enterprise' # unknown mode maps to Unspecified
|
||||||
tasmota.wifi_info['phy'] = '' # unknown PHY is null
|
tasmota.wifi_info['phy'] = '' # unknown PHY is null
|
||||||
|
|||||||
Reference in new issue
Block a user