From c460b7abc9936e9f8ff1b079e2ca97f24afd5ea5 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 3 Jul 2020 13:42:56 -0500 Subject: [PATCH] Fix unmocked setup in garmin_connect test (#37429) --- tests/components/garmin_connect/test_config_flow.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/components/garmin_connect/test_config_flow.py b/tests/components/garmin_connect/test_config_flow.py index 1c383d4343a..366573a276c 100644 --- a/tests/components/garmin_connect/test_config_flow.py +++ b/tests/components/garmin_connect/test_config_flow.py @@ -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