1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-08 17:49:37 +01:00

Fix romy tests opening sockets (#156466)

This commit is contained in:
Erik Montnemery
2025-11-12 20:10:46 +01:00
committed by GitHub
parent a7d01b0b03
commit 7eb6f7cc07
+12 -1
View File
@@ -1,8 +1,10 @@
"""Test the ROMY config flow."""
from collections.abc import Generator
from ipaddress import ip_address
from unittest.mock import Mock, PropertyMock, patch
from unittest.mock import AsyncMock, Mock, PropertyMock, patch
import pytest
from romy import RomyRobot
from homeassistant import config_entries
@@ -44,6 +46,15 @@ INPUT_CONFIG_HOST = {
}
@pytest.fixture(autouse=True)
def mock_setup_entry() -> Generator[AsyncMock]:
"""Override async_setup_entry."""
with patch(
"homeassistant.components.romy.async_setup_entry", return_value=True
) as mock_setup_entry:
yield mock_setup_entry
async def test_show_user_form_robot_is_offline_and_locked(hass: HomeAssistant) -> None:
"""Test that the user set up form with config."""