Skip to content

Commit

Permalink
Fix mock typing for Discovergy (#104047)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbede committed Nov 16, 2023
1 parent 38961c6 commit cf985a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/components/discovergy/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fixtures for Discovergy integration tests."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch

from pydiscovergy import Discovergy
Expand All @@ -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
Expand Down

0 comments on commit cf985a8

Please sign in to comment.