mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix snapcast test warning (#116687)
This commit is contained in:
parent
15b24dfbc2
commit
28ab45d5d8
@ -1,7 +1,7 @@
|
||||
"""Test the snapcast config flow."""
|
||||
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
@ -20,5 +20,6 @@ def mock_create_server() -> Generator[AsyncMock, None, None]:
|
||||
"""Create mock snapcast connection."""
|
||||
mock_connection = AsyncMock()
|
||||
mock_connection.start = AsyncMock(return_value=None)
|
||||
mock_connection.stop = MagicMock()
|
||||
with patch("snapcast.control.create_server", return_value=mock_connection):
|
||||
yield mock_connection
|
||||
|
Loading…
x
Reference in New Issue
Block a user