Add snapshot assertion to Airzone (#98760)
Co-authored-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
2ee55f5086
commit
a5dcc25aab
5 changed files with 700 additions and 74 deletions
|
@ -1,4 +1,5 @@
|
|||
"""The climate tests for the Airzone platform."""
|
||||
import copy
|
||||
from unittest.mock import patch
|
||||
|
||||
from aioairzone.const import (
|
||||
|
@ -222,7 +223,7 @@ async def test_airzone_create_climates(hass: HomeAssistant) -> None:
|
|||
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 22.8
|
||||
|
||||
HVAC_MOCK_CHANGED = {**HVAC_MOCK}
|
||||
HVAC_MOCK_CHANGED = copy.deepcopy(HVAC_MOCK)
|
||||
HVAC_MOCK_CHANGED[API_SYSTEMS][0][API_DATA][0][API_MAX_TEMP] = 25
|
||||
HVAC_MOCK_CHANGED[API_SYSTEMS][0][API_DATA][0][API_MIN_TEMP] = 10
|
||||
|
||||
|
@ -437,7 +438,7 @@ async def test_airzone_climate_set_hvac_mode(hass: HomeAssistant) -> None:
|
|||
state = hass.states.get("climate.salon")
|
||||
assert state.state == HVACMode.FAN_ONLY
|
||||
|
||||
HVAC_MOCK_NO_SET_POINT = {**HVAC_MOCK}
|
||||
HVAC_MOCK_NO_SET_POINT = copy.deepcopy(HVAC_MOCK)
|
||||
del HVAC_MOCK_NO_SET_POINT[API_SYSTEMS][0][API_DATA][0][API_SET_POINT]
|
||||
|
||||
with patch(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue