mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Patch entry setup in upcloud test (#82882)
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
"""Tests for the UpCloud config flow."""
|
"""Tests for the UpCloud config flow."""
|
||||||
|
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
import requests.exceptions
|
import requests.exceptions
|
||||||
from requests_mock import ANY
|
from requests_mock import ANY
|
||||||
from upcloud_api import UpCloudAPIError
|
from upcloud_api import UpCloudAPIError
|
||||||
@@ -81,6 +83,10 @@ async def test_options(hass):
|
|||||||
)
|
)
|
||||||
config_entry.add_to_hass(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)
|
result = await hass.config_entries.options.async_init(config_entry.entry_id)
|
||||||
assert result["type"] == data_entry_flow.FlowResultType.FORM
|
assert result["type"] == data_entry_flow.FlowResultType.FORM
|
||||||
assert result["step_id"] == "init"
|
assert result["step_id"] == "init"
|
||||||
|
Reference in New Issue
Block a user