From f7825eb5b19bf16f145389e4625ee2ad92d07616 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:30:01 +0200 Subject: [PATCH] Improve type hints in lyric tests (#121517) --- tests/components/lyric/test_config_flow.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/components/lyric/test_config_flow.py b/tests/components/lyric/test_config_flow.py index e1a8d1131dc..1e0ae04f741 100644 --- a/tests/components/lyric/test_config_flow.py +++ b/tests/components/lyric/test_config_flow.py @@ -26,7 +26,7 @@ CLIENT_SECRET = "5678" @pytest.fixture -async def mock_impl(hass): +async def mock_impl(hass: HomeAssistant) -> None: """Mock implementation.""" await async_setup_component(hass, DOMAIN, {}) await hass.async_block_till_done() @@ -45,12 +45,11 @@ async def test_abort_if_no_configuration(hass: HomeAssistant) -> None: assert result["reason"] == "missing_credentials" -@pytest.mark.usefixtures("current_request_with_host") +@pytest.mark.usefixtures("current_request_with_host", "mock_impl") async def test_full_flow( hass: HomeAssistant, hass_client_no_auth: ClientSessionGenerator, aioclient_mock: AiohttpClientMocker, - mock_impl, ) -> None: """Check full flow.""" result = await hass.config_entries.flow.async_init( @@ -112,12 +111,11 @@ async def test_full_flow( assert len(mock_setup.mock_calls) == 1 -@pytest.mark.usefixtures("current_request_with_host") +@pytest.mark.usefixtures("current_request_with_host", "mock_impl") async def test_reauthentication_flow( hass: HomeAssistant, hass_client_no_auth: ClientSessionGenerator, aioclient_mock: AiohttpClientMocker, - mock_impl, ) -> None: """Test reauthentication flow.""" old_entry = MockConfigEntry(