Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567)

This commit is contained in:
J. Nick Koston 2023-09-19 18:58:46 +02:00 committed by GitHub
parent 8dd3d6f989
commit 0eca433004
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
71 changed files with 575 additions and 462 deletions

View file

@ -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,