mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Mock out network.util.async_get_source_ip in tests (#55592)
This commit is contained in:
@@ -488,6 +488,16 @@ async def mqtt_mock(hass, mqtt_client_mock, mqtt_config):
|
||||
return component
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_get_source_ip():
|
||||
"""Mock network util's async_get_source_ip."""
|
||||
with patch(
|
||||
"homeassistant.components.network.util.async_get_source_ip",
|
||||
return_value="10.10.10.10",
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_zeroconf():
|
||||
"""Mock zeroconf."""
|
||||
|
||||
Reference in New Issue
Block a user