Add type hints to integration tests (part 22) (#88234)

This commit is contained in:
epenet 2023-02-16 14:08:03 +01:00 committed by GitHub
parent 567c7f4f99
commit 88cfbf6a34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 1269 additions and 559 deletions

View file

@ -78,8 +78,8 @@ async def test_form_other_error(
async def test_form_already_configured(
mock_wall_connector_setup, mock_wall_connector_version, hass
):
mock_wall_connector_setup, mock_wall_connector_version, hass: HomeAssistant
) -> None:
"""Test we get already configured."""
entry = MockConfigEntry(
@ -105,8 +105,8 @@ async def test_form_already_configured(
async def test_dhcp_can_finish(
mock_wall_connector_setup, mock_wall_connector_version, hass
):
mock_wall_connector_setup, mock_wall_connector_version, hass: HomeAssistant
) -> None:
"""Test DHCP discovery flow can finish right away."""
result = await hass.config_entries.flow.async_init(
@ -132,7 +132,9 @@ async def test_dhcp_can_finish(
assert result["data"] == {CONF_HOST: "1.2.3.4"}
async def test_dhcp_already_exists(mock_wall_connector_version, hass):
async def test_dhcp_already_exists(
mock_wall_connector_version, hass: HomeAssistant
) -> None:
"""Test DHCP discovery flow when device already exists."""
entry = MockConfigEntry(
@ -155,7 +157,9 @@ async def test_dhcp_already_exists(mock_wall_connector_version, hass):
assert result["reason"] == "already_configured"
async def test_dhcp_error_from_wall_connector(mock_wall_connector_version, hass):
async def test_dhcp_error_from_wall_connector(
mock_wall_connector_version, hass: HomeAssistant
) -> None:
"""Test DHCP discovery flow when we cannot communicate with the device."""
with patch(