mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Update cloudflare test helpers (#52235)
This commit is contained in:
parent
e14480599b
commit
bfc2995cf8
@ -58,13 +58,21 @@ async def init_integration(
|
|||||||
*,
|
*,
|
||||||
data: dict = ENTRY_CONFIG,
|
data: dict = ENTRY_CONFIG,
|
||||||
options: dict = ENTRY_OPTIONS,
|
options: dict = ENTRY_OPTIONS,
|
||||||
|
unique_id: str = MOCK_ZONE,
|
||||||
|
skip_setup: bool = False,
|
||||||
) -> MockConfigEntry:
|
) -> MockConfigEntry:
|
||||||
"""Set up the Cloudflare integration in Home Assistant."""
|
"""Set up the Cloudflare integration in Home Assistant."""
|
||||||
entry = MockConfigEntry(domain=DOMAIN, data=data, options=options)
|
entry = MockConfigEntry(
|
||||||
|
domain=DOMAIN,
|
||||||
|
data=data,
|
||||||
|
options=options,
|
||||||
|
unique_id=unique_id,
|
||||||
|
)
|
||||||
entry.add_to_hass(hass)
|
entry.add_to_hass(hass)
|
||||||
|
|
||||||
await hass.config_entries.async_setup(entry.entry_id)
|
if not skip_setup:
|
||||||
await hass.async_block_till_done()
|
await hass.config_entries.async_setup(entry.entry_id)
|
||||||
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
return entry
|
return entry
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user