Add type hints to integration tests (part 7) (#87980)

This commit is contained in:
epenet 2023-02-13 09:53:09 +01:00 committed by GitHub
parent b9beed4624
commit b68f502769
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 755 additions and 395 deletions

View file

@ -17,6 +17,7 @@ from homeassistant.components.climate import (
HVACMode,
)
from homeassistant.const import ATTR_ENTITY_ID
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr, entity_registry as er
from homeassistant.util.dt import utcnow
@ -27,7 +28,7 @@ from tests.common import async_fire_time_changed
uid = "3WRRJR6RCZQZSND8VP0YTO3YXCSOFPKBMW8T51TU-LQ*TWMYQKL3UVED4HSIIB9GXJWJZBQCXG-9VE-N2IUAIWI"
async def test_climate_get_state(hass, init_integration):
async def test_climate_get_state(hass: HomeAssistant, init_integration) -> None:
"""Test states of the climate."""
entity_registry = er.async_get(hass)
device_registry = dr.async_get(hass)
@ -83,7 +84,7 @@ async def test_climate_get_state(hass, init_integration):
assert state.attributes[ATTR_CURRENT_TEMPERATURE] == 20
async def test_climate_set_off(hass, init_integration):
async def test_climate_set_off(hass: HomeAssistant, init_integration) -> None:
"""Test set off climate."""
init_integration
entity_registry = er.async_get(hass)
@ -113,7 +114,9 @@ async def test_climate_set_off(hass, init_integration):
assert state.state == HVACMode.HEAT
async def test_climate_set_unsupported_hvac_mode(hass, init_integration):
async def test_climate_set_unsupported_hvac_mode(
hass: HomeAssistant, init_integration
) -> None:
"""Test set unsupported hvac mode climate."""
init_integration
entity_registry = er.async_get(hass)
@ -136,7 +139,7 @@ async def test_climate_set_unsupported_hvac_mode(hass, init_integration):
)
async def test_climate_set_temperature(hass, init_integration):
async def test_climate_set_temperature(hass: HomeAssistant, init_integration) -> None:
"""Test set temperature climate."""
init_integration
entity_registry = er.async_get(hass)
@ -181,7 +184,9 @@ async def test_climate_set_temperature(hass, init_integration):
assert state.attributes[ATTR_TEMPERATURE] == 21
async def test_climate_set_temperature_unsupported_hvac_mode(hass, init_integration):
async def test_climate_set_temperature_unsupported_hvac_mode(
hass: HomeAssistant, init_integration
) -> None:
"""Test set temperature climate unsupported hvac mode."""
init_integration
entity_registry = er.async_get(hass)