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:
@@ -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."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user