Fix aiodns DeprecationWarning in tests (#135921)

This commit is contained in:
Marc Mueller 2025-01-18 19:04:01 +01:00 committed by GitHub
parent fe8a93d62f
commit 24c50e0988
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,6 +33,7 @@ import bcrypt
import freezegun
import multidict
import pytest
import pytest_asyncio
import pytest_socket
import requests_mock
import respx
@ -1233,8 +1234,8 @@ def disable_translations_once(
translations_once.start()
@pytest.fixture(autouse=True, scope="session")
def mock_zeroconf_resolver() -> Generator[_patch]:
@pytest_asyncio.fixture(autouse=True, scope="session", loop_scope="session")
async def mock_zeroconf_resolver() -> AsyncGenerator[_patch]:
"""Mock out the zeroconf resolver."""
patcher = patch(
"homeassistant.helpers.aiohttp_client._async_make_resolver",