Add type hints to integration tests (d-e) (#87699)
This commit is contained in:
parent
5e214f2e43
commit
3052de3e8e
81 changed files with 765 additions and 450 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue