Improve type hints in lyric tests (#121517)

This commit is contained in:
epenet 2024-07-08 13:30:01 +02:00 committed by GitHub
parent 8ab6a505a4
commit f7825eb5b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,7 @@ CLIENT_SECRET = "5678"
@pytest.fixture @pytest.fixture
async def mock_impl(hass): async def mock_impl(hass: HomeAssistant) -> None:
"""Mock implementation.""" """Mock implementation."""
await async_setup_component(hass, DOMAIN, {}) await async_setup_component(hass, DOMAIN, {})
await hass.async_block_till_done() 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" 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( async def test_full_flow(
hass: HomeAssistant, hass: HomeAssistant,
hass_client_no_auth: ClientSessionGenerator, hass_client_no_auth: ClientSessionGenerator,
aioclient_mock: AiohttpClientMocker, aioclient_mock: AiohttpClientMocker,
mock_impl,
) -> None: ) -> None:
"""Check full flow.""" """Check full flow."""
result = await hass.config_entries.flow.async_init( result = await hass.config_entries.flow.async_init(
@ -112,12 +111,11 @@ async def test_full_flow(
assert len(mock_setup.mock_calls) == 1 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( async def test_reauthentication_flow(
hass: HomeAssistant, hass: HomeAssistant,
hass_client_no_auth: ClientSessionGenerator, hass_client_no_auth: ClientSessionGenerator,
aioclient_mock: AiohttpClientMocker, aioclient_mock: AiohttpClientMocker,
mock_impl,
) -> None: ) -> None:
"""Test reauthentication flow.""" """Test reauthentication flow."""
old_entry = MockConfigEntry( old_entry = MockConfigEntry(