From 918f3ba7f5b876fa9c6bc1628aaa77d7dbd8be5d Mon Sep 17 00:00:00 2001 From: Simon Oliver Tveit Date: Thu, 29 Aug 2024 09:35:02 +0200 Subject: [PATCH] Update tests to work with new downtime recording --- tests/tasks/test_reachabletask.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tasks/test_reachabletask.py b/tests/tasks/test_reachabletask.py index 23382410..a83d5ee9 100644 --- a/tests/tasks/test_reachabletask.py +++ b/tests/tasks/test_reachabletask.py @@ -40,6 +40,7 @@ async def test_run_should_update_event_to_reachable_when_device_is_reachable(sel task = reachable_task event = task.state.events.create_event(task.device.name, None, ReachabilityEvent) event.reachability = ReachabilityState.NORESPONSE + event.lasttrans = now() - timedelta(minutes=5) task.state.events.commit(event) assert (await task.run()) is None @@ -63,6 +64,7 @@ async def test_run_extra_job_should_update_event_to_reachable_when_device_is_rea task = reachable_task event = task.state.events.create_event(task.device.name, None, ReachabilityEvent) event.reachability = ReachabilityState.NORESPONSE + event.lasttrans = now() - timedelta(minutes=5) task.state.events.commit(event) assert (await task._run_extra_job()) is None