Fix unmocked setup in ipp tests (#37430)

This commit is contained in:
J. Nick Koston 2020-07-03 13:43:13 -05:00 committed by GitHub
parent c460b7abc9
commit 07f3d6ebd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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={}
)