Fix unmocked setup in garmin_connect test (#37429)

pull/37432/head
J. Nick Koston 2020-07-03 13:42:56 -05:00 committed by GitHub
parent 5805fbb99f
commit c460b7abc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -39,9 +39,13 @@ async def test_show_form(hass):
async def test_step_user(hass, mock_garmin_connect):
"""Test registering an integration and finishing flow works."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": "user"}, data=MOCK_CONF
)
with patch(
"homeassistant.components.garmin_connect.async_setup_entry", return_value=True
), patch("homeassistant.components.garmin_connect.async_setup", return_value=True):
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": "user"}, data=MOCK_CONF
)
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
assert result["data"] == MOCK_CONF