Add type hints to integration tests (d-e) (#87699)

This commit is contained in:
epenet 2023-02-08 13:01:44 +01:00 committed by GitHub
parent 5e214f2e43
commit 3052de3e8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
81 changed files with 765 additions and 450 deletions

View file

@ -7,12 +7,13 @@ from pyeconet.errors import InvalidCredentialsError, PyeconetError
from homeassistant.components.econet import DOMAIN
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType
from tests.common import MockConfigEntry
async def test_bad_credentials(hass):
async def test_bad_credentials(hass: HomeAssistant) -> None:
"""Test when provided credentials are rejected."""
result = await hass.config_entries.flow.async_init(
@ -42,7 +43,7 @@ async def test_bad_credentials(hass):
}
async def test_generic_error_from_library(hass):
async def test_generic_error_from_library(hass: HomeAssistant) -> None:
"""Test when connection fails."""
result = await hass.config_entries.flow.async_init(
@ -72,7 +73,7 @@ async def test_generic_error_from_library(hass):
}
async def test_auth_worked(hass):
async def test_auth_worked(hass: HomeAssistant) -> None:
"""Test when provided credentials are accepted."""
result = await hass.config_entries.flow.async_init(
@ -102,7 +103,7 @@ async def test_auth_worked(hass):
}
async def test_already_configured(hass):
async def test_already_configured(hass: HomeAssistant) -> None:
"""Test when provided credentials are already configured."""
config = {
CONF_EMAIL: "admin@localhost.com",