mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Improve type hints in fjaraskupan tests (#120732)
This commit is contained in:
parent
0fdf037ba0
commit
6f8c9c28e7
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from unittest.mock import patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from typing_extensions import Generator
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components.fjaraskupan.const import DOMAIN
|
from homeassistant.components.fjaraskupan.const import DOMAIN
|
||||||
@ -15,7 +16,7 @@ from . import COOKER_SERVICE_INFO
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="mock_setup_entry", autouse=True)
|
@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."""
|
"""Fixture for config entry."""
|
||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
@ -24,7 +25,7 @@ async def fixture_mock_setup_entry(hass):
|
|||||||
yield mock_setup_entry
|
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."""
|
"""Test we get the form."""
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.fjaraskupan.config_flow.async_discovered_service_info",
|
"homeassistant.components.fjaraskupan.config_flow.async_discovered_service_info",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user