Fix flakey airzone_cloud tests by avoiding creation of the websocket (#112102)
parent
2f223ae377
commit
25ba046ff1
|
@ -0,0 +1,15 @@
|
|||
"""Tests for the Airzone integration."""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def airzone_cloud_no_websockets():
|
||||
"""Fixture to completely disable Airzone Cloud WebSockets."""
|
||||
with patch(
|
||||
"homeassistant.components.airzone_cloud.AirzoneCloudApi._update_websockets",
|
||||
return_value=False,
|
||||
), patch("aioairzone_cloud.websockets.AirzoneCloudIWS.connect", return_value=True):
|
||||
yield
|
|
@ -46,9 +46,6 @@ async def test_coordinator_client_connector_error(hass: HomeAssistant) -> None:
|
|||
) as mock_webserver, patch(
|
||||
"homeassistant.components.airzone_cloud.AirzoneCloudApi.login",
|
||||
return_value=None,
|
||||
), patch(
|
||||
"homeassistant.components.airzone_cloud.AirzoneCloudApi._update_websockets",
|
||||
return_value=False,
|
||||
):
|
||||
await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
|
Loading…
Reference in New Issue