Add type hints to integration tests (part 22) (#88234)
This commit is contained in:
parent
567c7f4f99
commit
88cfbf6a34
50 changed files with 1269 additions and 559 deletions
|
@ -7,7 +7,11 @@ from homeassistant.components.device_automation import DeviceAutomationType
|
|||
from homeassistant.components.text import DOMAIN, device_action
|
||||
from homeassistant.const import EntityCategory
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv, device_registry as dr
|
||||
from homeassistant.helpers import (
|
||||
config_validation as cv,
|
||||
device_registry as dr,
|
||||
entity_registry as er,
|
||||
)
|
||||
from homeassistant.helpers.entity_registry import RegistryEntryHider
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
|
@ -20,7 +24,11 @@ from tests.common import (
|
|||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
||||
|
||||
|
||||
async def test_get_actions(hass, device_registry, entity_registry):
|
||||
async def test_get_actions(
|
||||
hass: HomeAssistant,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
entity_registry: er.EntityRegistry,
|
||||
) -> None:
|
||||
"""Test we get the expected actions for an entity."""
|
||||
config_entry = MockConfigEntry(domain="test", data={})
|
||||
config_entry.add_to_hass(hass)
|
||||
|
@ -57,12 +65,12 @@ async def test_get_actions(hass, device_registry, entity_registry):
|
|||
),
|
||||
)
|
||||
async def test_get_actions_hidden_auxiliary(
|
||||
hass,
|
||||
device_registry,
|
||||
entity_registry,
|
||||
hass: HomeAssistant,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
entity_registry: er.EntityRegistry,
|
||||
hidden_by,
|
||||
entity_category,
|
||||
):
|
||||
) -> None:
|
||||
"""Test we get the expected actions from a hidden or auxiliary entity."""
|
||||
config_entry = MockConfigEntry(domain="test", data={})
|
||||
config_entry.add_to_hass(hass)
|
||||
|
@ -95,7 +103,11 @@ async def test_get_actions_hidden_auxiliary(
|
|||
assert_lists_same(actions, expected_actions)
|
||||
|
||||
|
||||
async def test_get_action_no_state(hass, device_registry, entity_registry):
|
||||
async def test_get_action_no_state(
|
||||
hass: HomeAssistant,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
entity_registry: er.EntityRegistry,
|
||||
) -> None:
|
||||
"""Test we get the expected actions for an entity."""
|
||||
config_entry = MockConfigEntry(domain="test", data={})
|
||||
config_entry.add_to_hass(hass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue