Fix some tests

This commit is contained in:
G Johansson 2024-12-08 14:38:06 +00:00 committed by Franck Nijhof
parent 6fe2612f1d
commit f9cecc0cd5
3 changed files with 22 additions and 6 deletions

View File

@ -46,9 +46,7 @@ def camera_only() -> Generator[None]:
@pytest.fixture(name="mock_camera") @pytest.fixture(name="mock_camera")
async def mock_camera_fixture(hass: HomeAssistant) -> AsyncGenerator[None]: async def mock_camera_fixture(hass: HomeAssistant) -> AsyncGenerator[None]:
"""Initialize a demo camera platform.""" """Initialize a demo camera platform."""
assert await async_setup_component( assert await async_setup_component(hass, "demo", {"demo": {}})
hass, "camera", {camera.DOMAIN: {"platform": "demo"}}
)
await hass.async_block_till_done() await hass.async_block_till_done()
with patch( with patch(

View File

@ -52,9 +52,7 @@ from tests.typing import ClientSessionGenerator, WebSocketGenerator
@pytest.fixture(name="image_mock_url") @pytest.fixture(name="image_mock_url")
async def image_mock_url_fixture(hass: HomeAssistant) -> None: async def image_mock_url_fixture(hass: HomeAssistant) -> None:
"""Fixture for get_image tests.""" """Fixture for get_image tests."""
await async_setup_component( await async_setup_component(hass, "demo", {"demo": {}})
hass, camera.DOMAIN, {camera.DOMAIN: {"platform": "demo"}}
)
await hass.async_block_till_done() await hass.async_block_till_done()

View File

@ -0,0 +1,20 @@
demo_paulus:
name: Paulus
mac:
icon:
picture:
track: true
demo_anne_therese:
name: Anne Therese
mac:
icon:
picture:
track: true
demo_home_boy:
name: Home Boy
mac:
icon:
picture:
track: true