mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Improve type hints in ipma tests (#121501)
This commit is contained in:
parent
3059bf0536
commit
4d68ae1199
@ -14,7 +14,7 @@ from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def config_entry(hass):
|
||||
def config_entry(hass: HomeAssistant) -> MockConfigEntry:
|
||||
"""Define a config entry fixture."""
|
||||
entry = MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
|
@ -14,6 +14,8 @@ from homeassistant.data_entry_flow import FlowResultType
|
||||
|
||||
from . import MockLocation
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
@pytest.fixture(name="ipma_setup", autouse=True)
|
||||
def ipma_setup_fixture() -> Generator[None]:
|
||||
@ -93,7 +95,9 @@ async def test_config_flow_failures(hass: HomeAssistant) -> None:
|
||||
}
|
||||
|
||||
|
||||
async def test_flow_entry_already_exists(hass: HomeAssistant, init_integration) -> None:
|
||||
async def test_flow_entry_already_exists(
|
||||
hass: HomeAssistant, init_integration: MockConfigEntry
|
||||
) -> None:
|
||||
"""Test user input for config_entry that already exists.
|
||||
|
||||
Test when the form should show when user puts existing location
|
||||
|
@ -4,6 +4,7 @@ from syrupy.assertion import SnapshotAssertion
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
||||
from tests.typing import ClientSessionGenerator
|
||||
|
||||
@ -11,7 +12,7 @@ from tests.typing import ClientSessionGenerator
|
||||
async def test_diagnostics(
|
||||
hass: HomeAssistant,
|
||||
hass_client: ClientSessionGenerator,
|
||||
init_integration,
|
||||
init_integration: MockConfigEntry,
|
||||
snapshot: SnapshotAssertion,
|
||||
) -> None:
|
||||
"""Test diagnostics."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user