1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use config_entries.SOURCE_* constants (#49631)

This commit is contained in:
Ville Skyttä
2021-04-25 12:27:40 +03:00
committed by GitHub
parent 34a588d1ba
commit 153d6e891e
103 changed files with 723 additions and 488 deletions

View File

@@ -159,7 +159,9 @@ async def test_already_configured_with_ignored(hass):
"""Test ignored entries do not break checking for existing entries."""
await setup.async_setup_component(hass, "persistent_notification", {})
config_entry = MockConfigEntry(domain=DOMAIN, data={}, source="ignore")
config_entry = MockConfigEntry(
domain=DOMAIN, data={}, source=config_entries.SOURCE_IGNORE
)
config_entry.add_to_hass(hass)
result = await hass.config_entries.flow.async_init(
@@ -220,7 +222,7 @@ async def test_form_reauth(hass):
entry.add_to_hass(hass)
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": "reauth"}, data=entry.data
DOMAIN, context={"source": config_entries.SOURCE_REAUTH}, data=entry.data
)
assert result["type"] == "form"
assert result["errors"] == {}