Add type hints to integration tests (part 11) (#87996)
This commit is contained in:
parent
8f2a764a43
commit
1e352b60df
48 changed files with 610 additions and 307 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue