Skip to content

Commit

Permalink
Avoid calling internals when adding mock config entry in Nightscout (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede authored Feb 16, 2024
1 parent 4ededef commit 613b183
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/components/nightscout/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ async def test_user_form_duplicate(hass: HomeAssistant) -> None:
with _patch_glucose_readings(), _patch_server_status():
unique_id = hash_from_url(CONFIG[CONF_URL])
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(
DOMAIN,
context={"source": config_entries.SOURCE_USER},
Expand Down

0 comments on commit 613b183

Please sign in to comment.