Add return type hints in tests (k-z) (#118942)

This commit is contained in:
epenet 2024-06-06 10:11:29 +02:00 committed by GitHub
parent b5b7c9bcd5
commit c7cc465e5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 79 additions and 76 deletions

View file

@ -14,7 +14,7 @@ from tests.typing import WebSocketGenerator
async def test_knx_info_command(
hass: HomeAssistant, knx: KNXTestKit, hass_ws_client: WebSocketGenerator
):
) -> None:
"""Test knx/info command."""
await knx.setup_integration({})
client = await hass_ws_client(hass)
@ -33,7 +33,7 @@ async def test_knx_info_command_with_project(
knx: KNXTestKit,
hass_ws_client: WebSocketGenerator,
load_knxproj: None,
):
) -> None:
"""Test knx/info command with loaded project."""
await knx.setup_integration({})
client = await hass_ws_client(hass)
@ -55,7 +55,7 @@ async def test_knx_project_file_process(
knx: KNXTestKit,
hass_ws_client: WebSocketGenerator,
hass_storage: dict[str, Any],
):
) -> None:
"""Test knx/project_file_process command for storing and loading new data."""
_file_id = "1234"
_password = "pw-test"
@ -93,7 +93,7 @@ async def test_knx_project_file_process_error(
hass: HomeAssistant,
knx: KNXTestKit,
hass_ws_client: WebSocketGenerator,
):
) -> None:
"""Test knx/project_file_process exception handling."""
await knx.setup_integration({})
client = await hass_ws_client(hass)
@ -126,7 +126,7 @@ async def test_knx_project_file_remove(
knx: KNXTestKit,
hass_ws_client: WebSocketGenerator,
load_knxproj: None,
):
) -> None:
"""Test knx/project_file_remove command."""
await knx.setup_integration({})
client = await hass_ws_client(hass)
@ -146,7 +146,7 @@ async def test_knx_get_project(
knx: KNXTestKit,
hass_ws_client: WebSocketGenerator,
load_knxproj: None,
):
) -> None:
"""Test retrieval of kxnproject from store."""
await knx.setup_integration({})
client = await hass_ws_client(hass)
@ -161,7 +161,7 @@ async def test_knx_get_project(
async def test_knx_group_monitor_info_command(
hass: HomeAssistant, knx: KNXTestKit, hass_ws_client: WebSocketGenerator
):
) -> None:
"""Test knx/group_monitor_info command."""
await knx.setup_integration({})
client = await hass_ws_client(hass)
@ -176,7 +176,7 @@ async def test_knx_group_monitor_info_command(
async def test_knx_subscribe_telegrams_command_recent_telegrams(
hass: HomeAssistant, knx: KNXTestKit, hass_ws_client: WebSocketGenerator
):
) -> None:
"""Test knx/subscribe_telegrams command sending recent telegrams."""
await knx.setup_integration(
{
@ -224,7 +224,7 @@ async def test_knx_subscribe_telegrams_command_recent_telegrams(
async def test_knx_subscribe_telegrams_command_no_project(
hass: HomeAssistant, knx: KNXTestKit, hass_ws_client: WebSocketGenerator
):
) -> None:
"""Test knx/subscribe_telegrams command without project data."""
await knx.setup_integration(
{
@ -299,7 +299,7 @@ async def test_knx_subscribe_telegrams_command_project(
knx: KNXTestKit,
hass_ws_client: WebSocketGenerator,
load_knxproj: None,
):
) -> None:
"""Test knx/subscribe_telegrams command with project data."""
await knx.setup_integration({})
client = await hass_ws_client(hass)