Cleanup mock_get_source_ip from tests (#118459)

This commit is contained in:
epenet 2024-05-30 09:37:01 +02:00 committed by GitHub
parent 9221eeb2f7
commit c6e0e93680
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 53 additions and 171 deletions

View file

@ -47,9 +47,7 @@ def mock_setup_entry() -> Generator[AsyncMock, None, None]:
@pytest.fixture
def reolink_connect_class(
mock_get_source_ip: None,
) -> Generator[MagicMock, None, None]:
def reolink_connect_class() -> Generator[MagicMock, None, None]:
"""Mock reolink connection and return both the host_mock and host_mock_class."""
with (
patch(
@ -112,7 +110,7 @@ def reolink_connect(
@pytest.fixture
def reolink_platforms(mock_get_source_ip: None) -> Generator[None, None, None]:
def reolink_platforms() -> Generator[None, None, None]:
"""Mock reolink entry setup."""
with patch("homeassistant.components.reolink.PLATFORMS", return_value=[]):
yield