Skip to content

Commit ecd56c7

Browse files
committed
Try test5
1 parent e8059db commit ecd56c7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/test_usb.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,7 +2191,8 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
21912191
assert not await test_scan.set_motion_reset_timer(10)
21922192
assert not test_scan.scan_config_task_scheduled
21932193
assert await test_scan.set_motion_reset_timer(15)
2194-
assert test_scan.scan_config_task_scheduled
2194+
# scan_config_task_scheduled already set back to False due to task already executed
2195+
assert not test_scan.scan_config_task_scheduled
21952196
# Update failed due to None response
21962197
assert test_scan.motion_config.reset_timer == 10
21972198
assert test_scan.reset_timer == 10
@@ -2219,7 +2220,8 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
22192220
)
22202221
mock_stick_controller.send_response = scan_config_accepted
22212222
assert await test_scan.set_motion_reset_timer(25)
2222-
assert test_scan.scan_config_task_scheduled
2223+
2224+
assert not test_scan.scan_config_task_scheduled
22232225
await test_scan._awake_response(awake_response2) # pylint: disable=protected-access
22242226
await asyncio.sleep(0.001) # Ensure time for task to be executed
22252227
# assert not test_scan._scan_config_task_scheduled # _ added
@@ -2230,9 +2232,10 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
22302232
assert not test_scan.daylight_mode
22312233
assert not test_scan.motion_config.daylight_mode
22322234
assert not await test_scan.set_motion_daylight_mode(False)
2235+
# scan_config_task_scheduled already set back to False due to task already executed
22332236
assert not test_scan.scan_config_task_scheduled
22342237
assert await test_scan.set_motion_daylight_mode(True)
2235-
assert test_scan.scan_config_task_scheduled
2238+
assert not test_scan.scan_config_task_scheduled
22362239
awake_response3 = pw_responses.NodeAwakeResponse()
22372240
awake_response3.deserialize(
22382241
construct_message(b"004F1298347650AFBECD00", b"FFFE")
@@ -2258,7 +2261,7 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
22582261
assert await test_scan.set_motion_sensitivity_level(
22592262
pw_api.MotionSensitivity.HIGH
22602263
)
2261-
assert test_scan.scan_config_task_scheduled
2264+
assert not test_scan.scan_config_task_scheduled
22622265
awake_response4 = pw_responses.NodeAwakeResponse()
22632266
awake_response4.deserialize(
22642267
construct_message(b"004F1298347650AFBECD00", b"FFFE")

0 commit comments

Comments
 (0)