mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Add type hints to integration tests (f-g) (#87700)
This commit is contained in:
@@ -31,7 +31,7 @@ from homeassistant.setup import async_setup_component
|
||||
from tests.common import get_fixture_path
|
||||
|
||||
|
||||
async def test_default_state(hass):
|
||||
async def test_default_state(hass: HomeAssistant) -> None:
|
||||
"""Test lock group default state."""
|
||||
hass.states.async_set("lock.front", "locked")
|
||||
await async_setup_component(
|
||||
@@ -61,7 +61,7 @@ async def test_default_state(hass):
|
||||
assert entry.unique_id == "unique_identifier"
|
||||
|
||||
|
||||
async def test_state_reporting(hass):
|
||||
async def test_state_reporting(hass: HomeAssistant) -> None:
|
||||
"""Test the state reporting.
|
||||
|
||||
The group state is unavailable if all group members are unavailable.
|
||||
@@ -277,7 +277,7 @@ async def test_service_calls_basic(hass: HomeAssistant) -> None:
|
||||
)
|
||||
|
||||
|
||||
async def test_reload(hass):
|
||||
async def test_reload(hass: HomeAssistant) -> None:
|
||||
"""Test the ability to reload locks."""
|
||||
await async_setup_component(
|
||||
hass,
|
||||
@@ -318,7 +318,7 @@ async def test_reload(hass):
|
||||
assert hass.states.get("lock.outside_locks_g") is not None
|
||||
|
||||
|
||||
async def test_reload_with_platform_not_setup(hass):
|
||||
async def test_reload_with_platform_not_setup(hass: HomeAssistant) -> None:
|
||||
"""Test the ability to reload locks."""
|
||||
hass.states.async_set("lock.something", STATE_UNLOCKED)
|
||||
await async_setup_component(
|
||||
@@ -356,7 +356,9 @@ async def test_reload_with_platform_not_setup(hass):
|
||||
assert hass.states.get("lock.outside_locks_g") is not None
|
||||
|
||||
|
||||
async def test_reload_with_base_integration_platform_not_setup(hass):
|
||||
async def test_reload_with_base_integration_platform_not_setup(
|
||||
hass: HomeAssistant,
|
||||
) -> None:
|
||||
"""Test the ability to reload locks."""
|
||||
assert await async_setup_component(
|
||||
hass,
|
||||
@@ -392,7 +394,7 @@ async def test_reload_with_base_integration_platform_not_setup(hass):
|
||||
|
||||
|
||||
@patch.object(demo_lock, "LOCK_UNLOCK_DELAY", 0)
|
||||
async def test_nested_group(hass):
|
||||
async def test_nested_group(hass: HomeAssistant) -> None:
|
||||
"""Test nested lock group."""
|
||||
await async_setup_component(
|
||||
hass,
|
||||
|
||||
Reference in New Issue
Block a user