Skip to content

Commit

Permalink
Update tests to work with new downtime recording
Browse files Browse the repository at this point in the history
  • Loading branch information
stveit committed Aug 29, 2024
1 parent dd602c2 commit 918f3ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/tasks/test_reachabletask.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 918f3ba

Please sign in to comment.