Patch Shelly test setting up entry (#44842)

pull/44861/head
Paulus Schoutsen 2021-01-05 18:35:54 +01:00 committed by GitHub
parent 69b5176730
commit f1c116831f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -255,7 +255,12 @@ async def test_user_setup_ignored_device(hass):
settings=settings,
)
),
):
), patch(
"homeassistant.components.shelly.async_setup", return_value=True
) as mock_setup, patch(
"homeassistant.components.shelly.async_setup_entry",
return_value=True,
) as mock_setup_entry:
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
@ -266,6 +271,8 @@ async def test_user_setup_ignored_device(hass):
# Test config entry got updated with latest IP
assert entry.data["host"] == "1.1.1.1"
assert len(mock_setup.mock_calls) == 1
assert len(mock_setup_entry.mock_calls) == 1
async def test_form_firmware_unsupported(hass):