mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix unmocked setup in ipp tests (#37430)
This commit is contained in:
parent
c460b7abc9
commit
07f3d6ebd8
@ -17,6 +17,7 @@ from . import (
|
||||
mock_connection,
|
||||
)
|
||||
|
||||
from tests.async_mock import patch
|
||||
from tests.test_util.aiohttp import AiohttpClientMocker
|
||||
|
||||
|
||||
@ -308,6 +309,9 @@ async def test_full_user_flow_implementation(
|
||||
assert result["step_id"] == "user"
|
||||
assert result["type"] == RESULT_TYPE_FORM
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.ipp.async_setup_entry", return_value=True
|
||||
), patch("homeassistant.components.ipp.async_setup", return_value=True):
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
user_input={CONF_HOST: "192.168.1.31", CONF_BASE_PATH: "/ipp/print"},
|
||||
@ -338,6 +342,9 @@ async def test_full_zeroconf_flow_implementation(
|
||||
assert result["step_id"] == "zeroconf_confirm"
|
||||
assert result["type"] == RESULT_TYPE_FORM
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.ipp.async_setup_entry", return_value=True
|
||||
), patch("homeassistant.components.ipp.async_setup", return_value=True):
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={}
|
||||
)
|
||||
@ -370,6 +377,9 @@ async def test_full_zeroconf_tls_flow_implementation(
|
||||
assert result["type"] == RESULT_TYPE_FORM
|
||||
assert result["description_placeholders"] == {CONF_NAME: "EPSON XP-6000 Series"}
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.ipp.async_setup_entry", return_value=True
|
||||
), patch("homeassistant.components.ipp.async_setup", return_value=True):
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user