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

Add typing to tests with single hass argument (#87631)

This commit is contained in:
epenet
2023-02-07 15:01:16 +01:00
committed by GitHub
parent fe9f6823c3
commit 59ca7780fa
33 changed files with 104 additions and 75 deletions

View File

@@ -10,6 +10,7 @@ from homeassistant.components.text import (
SERVICE_SET_VALUE,
)
from homeassistant.const import ATTR_ENTITY_ID, ATTR_MODE, MAX_LENGTH_STATE_STATE
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
ENTITY_TEXT = "text.text"
@@ -22,7 +23,7 @@ async def setup_demo_text(hass):
await hass.async_block_till_done()
def test_setup_params(hass):
def test_setup_params(hass: HomeAssistant) -> None:
"""Test the initial parameters."""
state = hass.states.get(ENTITY_TEXT)
assert state.state == "Hello world"