Fix flakey august pubnub test (#53474)
parent
505dd500cb
commit
c18b626d67
tests/components/august
|
@ -290,6 +290,8 @@ async def test_lock_update_via_pubnub(hass):
|
|||
)
|
||||
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done()
|
||||
|
||||
lock_online_with_doorsense_name = hass.states.get("lock.online_with_doorsense_name")
|
||||
assert lock_online_with_doorsense_name.state == STATE_UNLOCKING
|
||||
|
||||
|
@ -297,7 +299,7 @@ async def test_lock_update_via_pubnub(hass):
|
|||
pubnub,
|
||||
Mock(
|
||||
channel=lock_one.pubsub_channel,
|
||||
timetoken=dt_util.utcnow().timestamp() * 10000000,
|
||||
timetoken=(dt_util.utcnow().timestamp() + 1) * 10000000,
|
||||
message={
|
||||
"status": "kAugLockState_Locking",
|
||||
},
|
||||
|
@ -305,6 +307,8 @@ async def test_lock_update_via_pubnub(hass):
|
|||
)
|
||||
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done()
|
||||
|
||||
lock_online_with_doorsense_name = hass.states.get("lock.online_with_doorsense_name")
|
||||
assert lock_online_with_doorsense_name.state == STATE_LOCKING
|
||||
|
||||
|
@ -329,13 +333,15 @@ async def test_lock_update_via_pubnub(hass):
|
|||
pubnub,
|
||||
Mock(
|
||||
channel=lock_one.pubsub_channel,
|
||||
timetoken=dt_util.utcnow().timestamp() * 10000000,
|
||||
timetoken=(dt_util.utcnow().timestamp() + 2) * 10000000,
|
||||
message={
|
||||
"status": "kAugLockState_Unlocking",
|
||||
},
|
||||
),
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done()
|
||||
|
||||
lock_online_with_doorsense_name = hass.states.get("lock.online_with_doorsense_name")
|
||||
assert lock_online_with_doorsense_name.state == STATE_UNLOCKING
|
||||
|
||||
|
|
Loading…
Reference in New Issue