Skip to content

Commit 836ec28

Browse files
committed
Catch PlugwiseError
1 parent 7fbb64c commit 836ec28

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

tests/test_smile.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4024,14 +4024,15 @@ async def test_connect_anna_heatpump_heating(self):
40244024
assert not smile._cooling_enabled
40254025
assert not smile._cooling_active
40264026

4027-
result = await self.tinker_thermostat(
4028-
smile,
4029-
"c784ee9fdab44e1395b8dee7d7a497d5",
4030-
good_schedules=[
4031-
"standaard",
4032-
],
4033-
)
4034-
assert result
4027+
with pytest.raises(pw_exceptions.PlugwiseError) as exc:
4028+
result = await self.tinker_thermostat(
4029+
smile,
4030+
"c784ee9fdab44e1395b8dee7d7a497d5",
4031+
good_schedules=[
4032+
"standaard",
4033+
],
4034+
)
4035+
_LOGGER.debug("ERROR raised: %s", exc.value)
40354036

40364037
# Now change some data and change directory reading xml from
40374038
# emulating reading newer dataset after an update_interval,

0 commit comments

Comments
 (0)