mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Improve type hints in openalpr_cloud tests (#123812)
This commit is contained in:
parent
e8157ed9a2
commit
679baddd3d
@ -6,7 +6,7 @@ import pytest
|
|||||||
|
|
||||||
from homeassistant.components import camera, image_processing as ip
|
from homeassistant.components import camera, image_processing as ip
|
||||||
from homeassistant.components.openalpr_cloud.image_processing import OPENALPR_API_URL
|
from homeassistant.components.openalpr_cloud.image_processing import OPENALPR_API_URL
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import Event, HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.common import assert_setup_component, async_capture_events, load_fixture
|
from tests.common import assert_setup_component, async_capture_events, load_fixture
|
||||||
@ -15,13 +15,13 @@ from tests.test_util.aiohttp import AiohttpClientMocker
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
async def setup_homeassistant(hass: HomeAssistant):
|
async def setup_homeassistant(hass: HomeAssistant) -> None:
|
||||||
"""Set up the homeassistant integration."""
|
"""Set up the homeassistant integration."""
|
||||||
await async_setup_component(hass, "homeassistant", {})
|
await async_setup_component(hass, "homeassistant", {})
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
async def setup_openalpr_cloud(hass):
|
async def setup_openalpr_cloud(hass: HomeAssistant) -> None:
|
||||||
"""Set up openalpr cloud."""
|
"""Set up openalpr cloud."""
|
||||||
config = {
|
config = {
|
||||||
ip.DOMAIN: {
|
ip.DOMAIN: {
|
||||||
@ -43,7 +43,7 @@ async def setup_openalpr_cloud(hass):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
async def alpr_events(hass):
|
async def alpr_events(hass: HomeAssistant) -> list[Event]:
|
||||||
"""Listen for events."""
|
"""Listen for events."""
|
||||||
return async_capture_events(hass, "image_processing.found_plate")
|
return async_capture_events(hass, "image_processing.found_plate")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user