Prevent 3rd party lib from opening sockets in sia tests (#56325)

This commit is contained in:
Erik Montnemery 2021-09-17 11:19:19 +02:00 committed by GitHub
parent 8814c53504
commit fce7f0873e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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",
[