Improve type hints in flux_led tests (#120734)
This commit is contained in:
parent
1e72c2f94d
commit
9b980602c9
1 changed files with 3 additions and 10 deletions
|
@ -3,18 +3,11 @@
|
|||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.common import mock_device_registry
|
||||
|
||||
|
||||
@pytest.fixture(name="device_reg")
|
||||
def device_reg_fixture(hass):
|
||||
"""Return an empty, loaded, registry."""
|
||||
return mock_device_registry(hass)
|
||||
from typing_extensions import Generator
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_single_broadcast_address():
|
||||
def mock_single_broadcast_address() -> Generator[None]:
|
||||
"""Mock network's async_async_get_ipv4_broadcast_addresses."""
|
||||
with patch(
|
||||
"homeassistant.components.network.async_get_ipv4_broadcast_addresses",
|
||||
|
@ -24,7 +17,7 @@ def mock_single_broadcast_address():
|
|||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_multiple_broadcast_addresses():
|
||||
def mock_multiple_broadcast_addresses() -> Generator[None]:
|
||||
"""Mock network's async_async_get_ipv4_broadcast_addresses to return multiple addresses."""
|
||||
with patch(
|
||||
"homeassistant.components.network.async_get_ipv4_broadcast_addresses",
|
||||
|
|
Loading…
Add table
Reference in a new issue