From fce7f0873ea0a6cb423b4585489ad4df27c45200 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 17 Sep 2021 11:19:19 +0200 Subject: [PATCH] Prevent 3rd party lib from opening sockets in sia tests (#56325) --- tests/components/sia/test_config_flow.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/components/sia/test_config_flow.py b/tests/components/sia/test_config_flow.py index 9679f4949e8..a91822c7846 100644 --- a/tests/components/sia/test_config_flow.py +++ b/tests/components/sia/test_config_flow.py @@ -209,6 +209,13 @@ async def test_abort_form(hass): assert get_abort["reason"] == "already_configured" +@pytest.fixture(autouse=True) +def mock_sia(): + """Mock SIAClient.""" + with patch("homeassistant.components.sia.hub.SIAClient", autospec=True): + yield + + @pytest.mark.parametrize( "field, value, error", [