fixed a few timer warning

This commit is contained in:
Pierre committed 2026-11-03 19:16:30 +01:00
1 parent 07abff7054
commit bed50f1d09
3 files changed
+9 -9

No files matched your search

+3 -3
View File
@@ -65,7 +65,7 @@ class PowerTests(unittest.TestCase):
connection.shutdown.assert_called_once_with(socket.SHUT_RDWR)
app.turn_off.assert_called_once_with('switch.vertex2')
self.assertFalse(app._vertex2_powered())
app.cancel_timer.assert_called_once_with('timer')
app.cancel_timer.assert_called_once_with('timer', silent=True)
self.assertIsNone(app._command_processing_deadline)
app.command_processing_sensor.set_state.assert_called_once_with(state='off')
app.unreachable_sensor.set_state.assert_called_once_with(state='off')
@@ -486,8 +486,8 @@ class SpamSensorTests(unittest.TestCase):
self.assertTrue(app._interrupt_stop.is_set())
self.assertIsNone(app._spam_timer)
self.assertIsNone(app._spam_deadline)
app.cancel_timer.assert_any_call('spam_timer')
app.cancel_timer.assert_any_call('timer')
app.cancel_timer.assert_any_call('spam_timer', silent=True)
app.cancel_timer.assert_any_call('timer', silent=True)
app.no_signal_spam_sensor.set_state.assert_not_called()
# An already queued expiry callback must also leave the state alone.
app._expire_no_signal_spam({'deadline': 110})