Skip to content

Commit

Permalink
test: fix bad mode preset_test
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Apr 6, 2020
1 parent 8144a3a commit e33d2df
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/unit_tests/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,8 @@ async def test_set_preset_mode_invalid_modes(monkeypatch):

await _climate.async_update()

preset_modes = _climate.preset_modes
with pytest.raises(UnknownPresetMode):
bad_modes = ["UKNOWN_MODE", "home", "auto", "away", "hot"]
for mode in bad_modes:
assert mode not in preset_modes
bad_modes = ["UKNOWN_MODE", "home", "auto", "away", "hot"]
for mode in bad_modes:
assert mode not in _climate.preset_modes
with pytest.raises(UnknownPresetMode):
await _climate.set_preset_mode(mode)

0 comments on commit e33d2df

Please sign in to comment.