mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add missing hass type hint in component tests (x) (#124285)
This commit is contained in:
parent
c2dc4ef215
commit
69a5605551
@ -704,7 +704,7 @@ async def test_config_flow_step_device_manual_model_succes(hass: HomeAssistant)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def config_flow_device_success(hass, model_to_test):
|
async def config_flow_device_success(hass: HomeAssistant, model_to_test: str) -> None:
|
||||||
"""Test a successful config flow for a device (base class)."""
|
"""Test a successful config flow for a device (base class)."""
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
const.DOMAIN, context={"source": config_entries.SOURCE_USER}
|
const.DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||||
@ -748,7 +748,7 @@ async def config_flow_device_success(hass, model_to_test):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def config_flow_generic_roborock(hass):
|
async def config_flow_generic_roborock(hass: HomeAssistant) -> None:
|
||||||
"""Test a successful config flow for a generic roborock vacuum."""
|
"""Test a successful config flow for a generic roborock vacuum."""
|
||||||
dummy_model = "roborock.vacuum.dummy"
|
dummy_model = "roborock.vacuum.dummy"
|
||||||
|
|
||||||
@ -794,7 +794,9 @@ async def config_flow_generic_roborock(hass):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async def zeroconf_device_success(hass, zeroconf_name_to_test, model_to_test):
|
async def zeroconf_device_success(
|
||||||
|
hass: HomeAssistant, zeroconf_name_to_test: str, model_to_test: str
|
||||||
|
) -> None:
|
||||||
"""Test a successful zeroconf discovery of a device (base class)."""
|
"""Test a successful zeroconf discovery of a device (base class)."""
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
const.DOMAIN,
|
const.DOMAIN,
|
||||||
|
@ -141,7 +141,7 @@ async def test_select_coordinator_update(hass: HomeAssistant, setup_test) -> Non
|
|||||||
assert state.state == "left"
|
assert state.state == "left"
|
||||||
|
|
||||||
|
|
||||||
async def setup_component(hass, entity_name):
|
async def setup_component(hass: HomeAssistant, entity_name: str) -> str:
|
||||||
"""Set up component."""
|
"""Set up component."""
|
||||||
entity_id = f"{DOMAIN}.{entity_name}"
|
entity_id = f"{DOMAIN}.{entity_name}"
|
||||||
|
|
||||||
|
@ -533,7 +533,7 @@ async def test_xiaomi_vacuum_fanspeeds(
|
|||||||
assert "Fan speed step not recognized" in caplog.text
|
assert "Fan speed step not recognized" in caplog.text
|
||||||
|
|
||||||
|
|
||||||
async def setup_component(hass, entity_name):
|
async def setup_component(hass: HomeAssistant, entity_name: str) -> str:
|
||||||
"""Set up vacuum component."""
|
"""Set up vacuum component."""
|
||||||
entity_id = f"{DOMAIN}.{entity_name}"
|
entity_id = f"{DOMAIN}.{entity_name}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user