Add tests for Plugwise integration (#36371)

This commit is contained in:
Tom authored and GitHub committed 2020-09-08 08:37:44 +02:00
1 parent 07d5af1969
commit bb9ea7ce6e
36 files changed
+580 -9

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
"""Common initialisation for the Plugwise integration."""
from homeassistant.components.plugwise import DOMAIN
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
from tests.test_util.aiohttp import AiohttpClientMocker
async def async_init_integration(
hass: HomeAssistant,
aioclient_mock: AiohttpClientMocker,
skip_setup: bool = False,
):
"""Initialize the Smile integration."""
entry = MockConfigEntry(
domain=DOMAIN, data={"host": "1.1.1.1", "password": "test-password"}
)
entry.add_to_hass(hass)
if not skip_setup:
await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
return entry