Patch entry setup in upcloud test (#82882)

This commit is contained in:
Joakim Sørensen 2022-11-28 22:38:31 +01:00 committed by GitHub
parent eb25968b31
commit 82b2aaaa3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"