From cf985a870204208f2901a41444303bb87a4c9101 Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Thu, 16 Nov 2023 14:43:02 +0100 Subject: [PATCH] Fix mock typing for Discovergy (#104047) --- tests/components/discovergy/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/components/discovergy/conftest.py b/tests/components/discovergy/conftest.py index b3a452e36e5..2409c30bc6c 100644 --- a/tests/components/discovergy/conftest.py +++ b/tests/components/discovergy/conftest.py @@ -1,4 +1,5 @@ """Fixtures for Discovergy integration tests.""" +from collections.abc import Generator from unittest.mock import AsyncMock, patch from pydiscovergy import Discovergy @@ -24,7 +25,7 @@ def _meter_last_reading(meter_id: str) -> Reading: @pytest.fixture(name="discovergy") -def mock_discovergy() -> None: +def mock_discovergy() -> Generator[AsyncMock, None, None]: """Mock the pydiscovergy client.""" mock = AsyncMock(spec=Discovergy) mock.meters.return_value = GET_METERS