From 24c50e0988ed59b2470d93278841ba4df07d76b6 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 18 Jan 2025 19:04:01 +0100 Subject: [PATCH] Fix aiodns DeprecationWarning in tests (#135921) --- tests/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 83409792f5a..3195e6918b9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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",