Browse Source

ci: ensure timestamp is up to date for heartbeat test

Jason Rumney 1 day ago
parent
commit
e0c05a4ba4
1 changed files with 1 additions and 0 deletions
  1. 1 0
      tests/test_device.py

+ 1 - 0
tests/test_device.py

@@ -604,6 +604,7 @@ async def test_async_receive(subject, mock_api, mocker):
     mock_api().set_socketPersistent.reset_mock()
     mock_api().set_socketPersistent.reset_mock()
     mock_api().status.reset_mock()
     mock_api().status.reset_mock()
     # Wait long enough to force a heartbeat poll on the next iteration
     # Wait long enough to force a heartbeat poll on the next iteration
+    subject._cached_state = subject._cached_state | {"updated_at": time()}
     await asyncio.sleep(10.1)
     await asyncio.sleep(10.1)
     # Call the function under test
     # Call the function under test
     print("getting second iteration...")
     print("getting second iteration...")