Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567)
This commit is contained in:
parent
8dd3d6f989
commit
0eca433004
71 changed files with 575 additions and 462 deletions
|
@ -1,5 +1,6 @@
|
|||
"""Test the Tado config flow."""
|
||||
from http import HTTPStatus
|
||||
from ipaddress import ip_address
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
@ -222,8 +223,8 @@ async def test_form_homekit(hass: HomeAssistant) -> None:
|
|||
DOMAIN,
|
||||
context={"source": config_entries.SOURCE_HOMEKIT},
|
||||
data=zeroconf.ZeroconfServiceInfo(
|
||||
host="mock_host",
|
||||
addresses=["mock_host"],
|
||||
ip_address=ip_address("127.0.0.1"),
|
||||
ip_addresses=[ip_address("127.0.0.1")],
|
||||
hostname="mock_hostname",
|
||||
name="mock_name",
|
||||
port=None,
|
||||
|
@ -249,8 +250,8 @@ async def test_form_homekit(hass: HomeAssistant) -> None:
|
|||
DOMAIN,
|
||||
context={"source": config_entries.SOURCE_HOMEKIT},
|
||||
data=zeroconf.ZeroconfServiceInfo(
|
||||
host="mock_host",
|
||||
addresses=["mock_host"],
|
||||
ip_address=ip_address("127.0.0.1"),
|
||||
ip_addresses=[ip_address("127.0.0.1")],
|
||||
hostname="mock_hostname",
|
||||
name="mock_name",
|
||||
port=None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue