* Add Ring config flow * Address comments + migrate platforms to config entry * Migrate camera too * Address comments * Fix order config flows * setup -> async_setup
15 lines
587 B
Python
15 lines
587 B
Python
"""Common methods used across the tests for ring devices."""
|
|
from unittest.mock import patch
|
|
|
|
from homeassistant.components.ring import DOMAIN
|
|
from homeassistant.setup import async_setup_component
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
async def setup_platform(hass, platform):
|
|
"""Set up the ring platform and prerequisites."""
|
|
MockConfigEntry(domain=DOMAIN, data={"username": "foo"}).add_to_hass(hass)
|
|
with patch("homeassistant.components.ring.PLATFORMS", [platform]):
|
|
assert await async_setup_component(hass, DOMAIN, {})
|
|
await hass.async_block_till_done()
|