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,6 +1,7 @@
"""Tests for Overkiz (by Somfy) config flow."""
from __future__ import annotations
from ipaddress import ip_address
from unittest.mock import AsyncMock, Mock, patch
from aiohttp import ClientError
@ -37,8 +38,8 @@ MOCK_GATEWAY_RESPONSE = [Mock(id=TEST_GATEWAY_ID)]
MOCK_GATEWAY2_RESPONSE = [Mock(id=TEST_GATEWAY_ID2)]
FAKE_ZERO_CONF_INFO = ZeroconfServiceInfo(
host="192.168.0.51",
addresses=["192.168.0.51"],
ip_address=ip_address("192.168.0.51"),
ip_addresses=[ip_address("192.168.0.51")],
port=443,
hostname=f"gateway-{TEST_GATEWAY_ID}.local.",
type="_kizbox._tcp.local.",