mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Avoid calling internals when adding mock config entry in Nightscout (#110600)
This commit is contained in:
parent
4ededefe24
commit
613b183898
@ -104,7 +104,8 @@ async def test_user_form_duplicate(hass: HomeAssistant) -> None:
|
|||||||
with _patch_glucose_readings(), _patch_server_status():
|
with _patch_glucose_readings(), _patch_server_status():
|
||||||
unique_id = hash_from_url(CONFIG[CONF_URL])
|
unique_id = hash_from_url(CONFIG[CONF_URL])
|
||||||
entry = MockConfigEntry(domain=DOMAIN, unique_id=unique_id)
|
entry = MockConfigEntry(domain=DOMAIN, unique_id=unique_id)
|
||||||
await hass.config_entries.async_add(entry)
|
entry.add_to_hass(hass)
|
||||||
|
|
||||||
result = await hass.config_entries.flow.async_init(
|
result = await hass.config_entries.flow.async_init(
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
context={"source": config_entries.SOURCE_USER},
|
context={"source": config_entries.SOURCE_USER},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user