test: adapt tests to consider returned DeviceStatus for on_trigger/complete

This commit is contained in:
2024-07-21 16:47:05 +02:00
parent f3118765b0
commit f8e9aaf55a
2 changed files with 27 additions and 11 deletions

View File

@ -72,13 +72,12 @@ def test_unstage(detector_base):
rtr = detector_base.unstage()
assert isinstance(rtr, list)
assert mock_check_scan_id.call_count == 1
mock_on_unstage.assert_not_called()
assert mock_on_unstage.call_count == 1
detector_base.stopped = False
rtr = detector_base.unstage()
assert isinstance(rtr, list)
assert mock_check_scan_id.call_count == 2
assert detector_base.stopped is False
mock_on_unstage.assert_called_once()
assert mock_on_unstage.call_count == 2
def test_complete(detector_base):