mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 19:09:32 +00:00
Add type hints to integration tests (part 11) (#87996)
This commit is contained in:
@@ -75,8 +75,11 @@ async def test_setup_component_with_service(hass: HomeAssistant) -> None:
|
||||
return_value=b"Test",
|
||||
)
|
||||
async def test_get_image_from_camera(
|
||||
mock_camera_read, hass, aiohttp_unused_port, enable_custom_integrations
|
||||
):
|
||||
mock_camera_read,
|
||||
hass: HomeAssistant,
|
||||
aiohttp_unused_port,
|
||||
enable_custom_integrations: None,
|
||||
) -> None:
|
||||
"""Grab an image from camera entity."""
|
||||
await setup_image_processing(hass, aiohttp_unused_port)
|
||||
|
||||
@@ -95,8 +98,11 @@ async def test_get_image_from_camera(
|
||||
side_effect=HomeAssistantError(),
|
||||
)
|
||||
async def test_get_image_without_exists_camera(
|
||||
mock_image, hass, aiohttp_unused_port, enable_custom_integrations
|
||||
):
|
||||
mock_image,
|
||||
hass: HomeAssistant,
|
||||
aiohttp_unused_port,
|
||||
enable_custom_integrations: None,
|
||||
) -> None:
|
||||
"""Try to get image without exists camera."""
|
||||
await setup_image_processing(hass, aiohttp_unused_port)
|
||||
|
||||
@@ -141,7 +147,9 @@ async def test_face_event_call(
|
||||
"homeassistant.components.demo.image_processing.DemoImageProcessingFace.confidence",
|
||||
new_callable=PropertyMock(return_value=None),
|
||||
)
|
||||
async def test_face_event_call_no_confidence(mock_config, hass, aioclient_mock):
|
||||
async def test_face_event_call_no_confidence(
|
||||
mock_config, hass: HomeAssistant, aioclient_mock: AiohttpClientMocker
|
||||
) -> None:
|
||||
"""Set up and scan a picture and test faces from event."""
|
||||
face_events = await setup_image_processing_face(hass)
|
||||
aioclient_mock.get(get_url(hass), content=b"image")
|
||||
|
||||
Reference in New Issue
Block a user