forked from home-assistant/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests to honeywell (home-assistant#87209)
* lower case aiosomecomfort * add tests * Test updates for 0.0.6 * lower case aiosomecomfort * Missing changes after merge * Add missing type hints * Fix tests for PR#89393 * Test hold on when setting temperature * Remove unnecessary init function * Remove unnecessary assert * Address missing tests Cleanup related to comments for EM * Move to snapshot for static test * Updated snapshot * Remove unnecessary assert
- Loading branch information
Showing
7 changed files
with
1,236 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
"""Tests for honeywell component.""" | ||
from unittest.mock import MagicMock | ||
|
||
from homeassistant.core import HomeAssistant | ||
|
||
from tests.common import MockConfigEntry | ||
|
||
|
||
async def init_integration( | ||
hass: HomeAssistant, entry: MockConfigEntry | ||
) -> MockConfigEntry: | ||
"""Set up the Honeywell integration in Home Assistant.""" | ||
entry.add_to_hass(hass) | ||
await hass.config_entries.async_setup(entry.entry_id) | ||
await hass.async_block_till_done() | ||
|
||
return entry | ||
|
||
|
||
def reset_mock(device: MagicMock) -> None: | ||
"""Reset the mocks for test.""" | ||
device.set_setpoint_cool.reset_mock() | ||
device.set_setpoint_heat.reset_mock() | ||
device.set_hold_heat.reset_mock() | ||
device.set_hold_cool.reset_mock() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# serializer version: 1 | ||
# name: test_static_attributes | ||
ReadOnlyDict({ | ||
'aux_heat': 'off', | ||
'current_humidity': 50, | ||
'current_temperature': -6.7, | ||
'fan_action': 'idle', | ||
'fan_mode': 'auto', | ||
'fan_modes': list([ | ||
'on', | ||
'auto', | ||
'diffuse', | ||
]), | ||
'friendly_name': 'device1', | ||
'humidity': None, | ||
'hvac_modes': list([ | ||
<HVACMode.OFF: 'off'>, | ||
<HVACMode.HEAT_COOL: 'heat_cool'>, | ||
<HVACMode.COOL: 'cool'>, | ||
<HVACMode.HEAT: 'heat'>, | ||
]), | ||
'max_humidity': 99, | ||
'max_temp': 1.7, | ||
'min_humidity': 30, | ||
'min_temp': -13.9, | ||
'permanent_hold': False, | ||
'preset_mode': None, | ||
'preset_modes': list([ | ||
'none', | ||
'away', | ||
'Hold', | ||
]), | ||
'supported_features': <ClimateEntityFeature: 95>, | ||
'target_temp_high': None, | ||
'target_temp_low': None, | ||
'temperature': None, | ||
}) | ||
# --- |
Oops, something went wrong.