Skip to content

Commit 21772d5

Browse files
committed
Test scan: add features assert
1 parent 9b632df commit 21772d5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_usb.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,6 +2151,7 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
21512151
load_callback,
21522152
)
21532153
assert not test_scan.cache_enabled
2154+
21542155
node_info = pw_api.NodeInfoMessage(
21552156
current_logaddress_pointer=None,
21562157
firmware=dt(2011, 6, 27, 8, 55, 44, tzinfo=UTC),
@@ -2160,6 +2161,16 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
21602161
)
21612162
await test_scan.update_node_details(node_info)
21622163
await test_scan.load()
2164+
assert sorted(test_scan.features) == sorted(
2165+
(
2166+
pw_api.NodeFeature.AVAILABLE,
2167+
pw_api.NodeFeature.BATTERY,
2168+
pw_api.NodeFeature.INFO,
2169+
pw_api.NodeFeature.MOTION,
2170+
pw_api.NodeFeature.MOTION_CONFIG,
2171+
pw_api.NodeFeature.PING,
2172+
)
2173+
)
21632174

21642175
scan_config_accepted = pw_responses.NodeAckResponse()
21652176
scan_config_accepted.deserialize(

0 commit comments

Comments
 (0)