From 82b2aaaa3ead906f55ee5a0da8e63763a81b4a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Mon, 28 Nov 2022 22:38:31 +0100 Subject: [PATCH] Patch entry setup in upcloud test (#82882) --- tests/components/upcloud/test_config_flow.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/components/upcloud/test_config_flow.py b/tests/components/upcloud/test_config_flow.py index 4bbc7c51b9d..5757469fafe 100644 --- a/tests/components/upcloud/test_config_flow.py +++ b/tests/components/upcloud/test_config_flow.py @@ -1,5 +1,7 @@ """Tests for the UpCloud config flow.""" +from unittest.mock import patch + import requests.exceptions from requests_mock import ANY from upcloud_api import UpCloudAPIError @@ -81,6 +83,10 @@ async def test_options(hass): ) config_entry.add_to_hass(hass) + with patch("homeassistant.components.upcloud.async_setup_entry", return_value=True): + await hass.config_entries.async_setup(config_entry.entry_id) + await hass.async_block_till_done() + result = await hass.config_entries.options.async_init(config_entry.entry_id) assert result["type"] == data_entry_flow.FlowResultType.FORM assert result["step_id"] == "init"