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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
103 changed files with 723 additions and 488 deletions

View file

@ -238,7 +238,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"] == {}
@ -284,7 +284,7 @@ async def test_form_reauth_with_2fa(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"] == {}