1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add typing to tests with single hass argument (2) (#87675)

* Add typing to tests with single hass argument (2)

* a few more
This commit is contained in:
epenet
2023-02-08 08:51:43 +01:00
committed by GitHub
parent 1bbc03d0ba
commit c98b4e3204
50 changed files with 816 additions and 671 deletions

View File

@@ -5,7 +5,7 @@ import voluptuous as vol
from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import ATTR_FRIENDLY_NAME
from homeassistant.core import State
from homeassistant.core import HomeAssistant, State
from homeassistant.helpers import (
area_registry,
config_validation as cv,
@@ -23,7 +23,7 @@ class MockIntentHandler(intent.IntentHandler):
self.slot_schema = slot_schema
async def test_async_match_states(hass):
async def test_async_match_states(hass: HomeAssistant) -> None:
"""Test async_match_state helper."""
areas = area_registry.async_get(hass)
area_kitchen = areas.async_get_or_create("kitchen")
@@ -101,7 +101,7 @@ async def test_async_match_states(hass):
) == [state2]
async def test_match_device_area(hass):
async def test_match_device_area(hass: HomeAssistant) -> None:
"""Test async_match_state with a device in an area."""
areas = area_registry.async_get(hass)
area_kitchen = areas.async_get_or_create("kitchen")