Skip to content

Commit 510a03d

Browse files
committed
Rework tinker_thermostat_preset()
1 parent 900ad1f commit 510a03d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_smile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ async def tinker_thermostat_temp(self, smile, loc_id, unhappy=False):
496496
raise self.UnexpectedError
497497

498498
@pytest.mark.asyncio
499-
async def tinker_thermostat_preset(self, smile, loc_id, unhappy=False):
499+
async def tinker_thermostat_preset(self, smile, loc_id):
500500
"""Toggle preset to test functionality."""
501501
for new_preset in ["asleep", "home", "!bogus"]:
502502
warning = ""
@@ -511,7 +511,7 @@ async def tinker_thermostat_preset(self, smile, loc_id, unhappy=False):
511511
pw_exceptions.ErrorSendingCommandError,
512512
pw_exceptions.ResponseError,
513513
):
514-
if unhappy:
514+
if new_preset[0] == "!":
515515
_LOGGER.info(" + failed as expected")
516516
else: # pragma: no cover
517517
_LOGGER.info(" - failed unexpectedly")

0 commit comments

Comments
 (0)