Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locally patch AirzoneLocalApi in tests #68770

Merged
merged 1 commit into from Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/components/airzone/test_config_flow.py
Expand Up @@ -21,7 +21,7 @@ async def test_form(hass):
"homeassistant.components.airzone.async_setup_entry",
return_value=True,
) as mock_setup_entry, patch(
"aioairzone.localapi_device.AirzoneLocalApi.get_hvac",
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
return_value=HVAC_MOCK,
):
result = await hass.config_entries.flow.async_init(
Expand Down Expand Up @@ -57,7 +57,7 @@ async def test_form_duplicated_id(hass):
entry.add_to_hass(hass)

with patch(
"aioairzone.localapi_device.AirzoneLocalApi.get_hvac",
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
return_value=HVAC_MOCK,
):
result = await hass.config_entries.flow.async_init(
Expand All @@ -72,7 +72,7 @@ async def test_connection_error(hass):
"""Test connection to host error."""

with patch(
"aioairzone.localapi_device.AirzoneLocalApi.validate_airzone",
"homeassistant.components.airzone.AirzoneLocalApi.validate_airzone",
side_effect=ClientConnectorError(MagicMock(), MagicMock()),
):
result = await hass.config_entries.flow.async_init(
Expand Down
2 changes: 1 addition & 1 deletion tests/components/airzone/test_init.py
Expand Up @@ -19,7 +19,7 @@ async def test_unload_entry(hass):
config_entry.add_to_hass(hass)

with patch(
"aioairzone.localapi_device.AirzoneLocalApi.get_hvac",
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
return_value=HVAC_MOCK,
):
assert await hass.config_entries.async_setup(config_entry.entry_id)
Expand Down
2 changes: 1 addition & 1 deletion tests/components/airzone/util.py
Expand Up @@ -157,7 +157,7 @@ async def async_init_integration(
entry.add_to_hass(hass)

with patch(
"aioairzone.localapi_device.AirzoneLocalApi.get_hvac",
"homeassistant.components.airzone.AirzoneLocalApi.get_hvac",
return_value=HVAC_MOCK,
):
await hass.config_entries.async_setup(entry.entry_id)
Expand Down