Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
denpamusic committed Oct 13, 2023
1 parent 5891717 commit bc24a7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ async def test_set(ecomax: EcoMAX, messages: dict[FrameType, bytearray]) -> None
async def test_turn_on(ecomax: EcoMAX, caplog) -> None:
"""Test turning the controller on."""
assert not await ecomax.turn_on()
assert "ecoMAX control is not available" in caplog.text
assert "ecoMAX control isn't available" in caplog.text
ecomax.data[ATTR_ECOMAX_CONTROL] = AsyncMock()
assert await ecomax.turn_on()
ecomax.data[ATTR_ECOMAX_CONTROL].turn_on.assert_awaited_once()
Expand All @@ -569,7 +569,7 @@ async def test_turn_on(ecomax: EcoMAX, caplog) -> None:
async def test_turn_off(ecomax: EcoMAX, caplog) -> None:
"""Test turning the controller off."""
await ecomax.turn_off()
assert "ecoMAX control is not available" in caplog.text
assert "ecoMAX control isn't available" in caplog.text
ecomax.data[ATTR_ECOMAX_CONTROL] = AsyncMock()
await ecomax.turn_off()
ecomax.data[ATTR_ECOMAX_CONTROL].turn_off.assert_awaited_once()
Expand Down

0 comments on commit bc24a7c

Please sign in to comment.