mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +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."""
|
||||
|
||||
from collections.abc import Callable
|
||||
from contextlib import nullcontext as does_not_raise
|
||||
from contextlib import AbstractContextManager, nullcontext as does_not_raise
|
||||
import logging
|
||||
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(
|
||||
hass: HomeAssistant, mock_mozart_client, mock_config_entry: MockConfigEntry
|
||||
hass: HomeAssistant,
|
||||
mock_mozart_client: AsyncMock,
|
||||
mock_config_entry: MockConfigEntry,
|
||||
) -> None:
|
||||
"""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_config_entry: MockConfigEntry,
|
||||
source: Source,
|
||||
expected_result: Callable,
|
||||
expected_result: AbstractContextManager,
|
||||
seek_called_times: int,
|
||||
) -> None:
|
||||
"""Test async_media_seek."""
|
||||
@ -681,7 +682,7 @@ async def test_async_select_source(
|
||||
mock_mozart_client: AsyncMock,
|
||||
mock_config_entry: MockConfigEntry,
|
||||
source: str,
|
||||
expected_result: Callable,
|
||||
expected_result: AbstractContextManager,
|
||||
audio_source_call: int,
|
||||
video_source_call: int,
|
||||
) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user