Mock out network.util.async_get_source_ip in tests (#57039)
This commit is contained in:
parent
70f4bdf63e
commit
582788026a
2 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ from homeassistant.config_entries import SOURCE_USER
|
|||
from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
async def test_config_flow(hass):
|
||||
async def test_config_flow(hass, mock_get_source_ip):
|
||||
"""Test we can finish a config flow."""
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": SOURCE_USER}
|
||||
|
@ -21,7 +21,7 @@ async def test_config_flow(hass):
|
|||
assert state
|
||||
|
||||
|
||||
async def test_already_setup(hass):
|
||||
async def test_already_setup(hass, mock_get_source_ip):
|
||||
"""Test we abort if already setup."""
|
||||
MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
|
|
|
@ -6,7 +6,7 @@ from homeassistant.components.zeroconf import MDNS_TARGET_IP
|
|||
from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
async def test_basic_setup(hass):
|
||||
async def test_basic_setup(hass, mock_get_source_ip):
|
||||
"""Test component setup creates entry from config."""
|
||||
entry = MockConfigEntry(domain=DOMAIN, data={})
|
||||
entry.add_to_hass(hass)
|
||||
|
|
Loading…
Add table
Reference in a new issue