mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Fix Bang & Olufsen testing typing (#125427)
* Fix test parameter typed as callable instead of context manager * Add missing AsyncMock typing
This commit is contained in:
parent
74b78307ee
commit
943b96e7a1
@ -1,7 +1,6 @@
|
|||||||
"""Test the Bang & Olufsen media_player entity."""
|
"""Test the Bang & Olufsen media_player entity."""
|
||||||
|
|
||||||
from collections.abc import Callable
|
from contextlib import AbstractContextManager, nullcontext as does_not_raise
|
||||||
from contextlib import nullcontext as does_not_raise
|
|
||||||
import logging
|
import logging
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import AsyncMock, patch
|
||||||
|
|
||||||
@ -150,7 +149,9 @@ async def test_async_update_sources_outdated_api(
|
|||||||
|
|
||||||
|
|
||||||
async def test_async_update_sources_remote(
|
async def test_async_update_sources_remote(
|
||||||
hass: HomeAssistant, mock_mozart_client, mock_config_entry: MockConfigEntry
|
hass: HomeAssistant,
|
||||||
|
mock_mozart_client: AsyncMock,
|
||||||
|
mock_config_entry: MockConfigEntry,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test _async_update_sources is called when there are new video sources."""
|
"""Test _async_update_sources is called when there are new video sources."""
|
||||||
|
|
||||||
@ -595,7 +596,7 @@ async def test_async_media_seek(
|
|||||||
mock_mozart_client: AsyncMock,
|
mock_mozart_client: AsyncMock,
|
||||||
mock_config_entry: MockConfigEntry,
|
mock_config_entry: MockConfigEntry,
|
||||||
source: Source,
|
source: Source,
|
||||||
expected_result: Callable,
|
expected_result: AbstractContextManager,
|
||||||
seek_called_times: int,
|
seek_called_times: int,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test async_media_seek."""
|
"""Test async_media_seek."""
|
||||||
@ -681,7 +682,7 @@ async def test_async_select_source(
|
|||||||
mock_mozart_client: AsyncMock,
|
mock_mozart_client: AsyncMock,
|
||||||
mock_config_entry: MockConfigEntry,
|
mock_config_entry: MockConfigEntry,
|
||||||
source: str,
|
source: str,
|
||||||
expected_result: Callable,
|
expected_result: AbstractContextManager,
|
||||||
audio_source_call: int,
|
audio_source_call: int,
|
||||||
video_source_call: int,
|
video_source_call: int,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user