Skip to content

Commit

Permalink
fix update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darkxst committed Oct 4, 2024
1 parent 1ee317c commit 738ae1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/components/smlight/test_update.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Tests for the SMLIGHT update platform."""

from datetime import timedelta
from unittest.mock import MagicMock

from freezegun.api import FrozenDateTimeFactory
Expand Down Expand Up @@ -124,7 +125,7 @@ async def test_update_firmware(
sw_version="v2.5.2",
)

freezer.tick(SCAN_FIRMWARE_INTERVAL)
freezer.tick(timedelta(seconds=5))
async_fire_time_changed(hass)
await hass.async_block_till_done()

Expand Down Expand Up @@ -209,6 +210,7 @@ async def _call_event_function(event: MessageEvent):

with pytest.raises(HomeAssistantError):
await _call_event_function(MOCK_FIRMWARE_FAIL)

state = hass.states.get(entity_id)
assert state.attributes[ATTR_IN_PROGRESS] is False

Expand Down

0 comments on commit 738ae1a

Please sign in to comment.