mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Mod tests
This commit is contained in:
parent
f9cecc0cd5
commit
1a32a2f9c2
@ -46,7 +46,9 @@ 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(hass, "demo", {"demo": {}})
|
assert await async_setup_component(
|
||||||
|
hass, "camera", {camera.DOMAIN: {"platform": "demo"}}
|
||||||
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
|
@ -52,7 +52,9 @@ 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(hass, "demo", {"demo": {}})
|
await async_setup_component(
|
||||||
|
hass, camera.DOMAIN, {camera.DOMAIN: {"platform": "demo"}}
|
||||||
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
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
|
|
Loading…
x
Reference in New Issue
Block a user