From 6f8c9c28e7eace8026efd19d4b0c753ca65eb0e3 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:03:26 +0200 Subject: [PATCH] Improve type hints in fjaraskupan tests (#120732) --- tests/components/fjaraskupan/test_config_flow.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/components/fjaraskupan/test_config_flow.py b/tests/components/fjaraskupan/test_config_flow.py index fa0df9241dd..886e01c8966 100644 --- a/tests/components/fjaraskupan/test_config_flow.py +++ b/tests/components/fjaraskupan/test_config_flow.py @@ -2,9 +2,10 @@ from __future__ import annotations -from unittest.mock import patch +from unittest.mock import AsyncMock, patch import pytest +from typing_extensions import Generator from homeassistant import config_entries from homeassistant.components.fjaraskupan.const import DOMAIN @@ -15,7 +16,7 @@ from . import COOKER_SERVICE_INFO @pytest.fixture(name="mock_setup_entry", autouse=True) -async def fixture_mock_setup_entry(hass): +def fixture_mock_setup_entry() -> Generator[AsyncMock]: """Fixture for config entry.""" with patch( @@ -24,7 +25,7 @@ async def fixture_mock_setup_entry(hass): yield mock_setup_entry -async def test_configure(hass: HomeAssistant, mock_setup_entry) -> None: +async def test_configure(hass: HomeAssistant, mock_setup_entry: AsyncMock) -> None: """Test we get the form.""" with patch( "homeassistant.components.fjaraskupan.config_flow.async_discovered_service_info",