Improve type hints in ipma tests (#121501)

This commit is contained in:
epenet 2024-07-08 11:38:27 +02:00 committed by GitHub
parent 3059bf0536
commit 4d68ae1199
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View File

@ -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,

View File

@ -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

View File

@ -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."""