Fix snapcast test warning (#116687)
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…
Reference in New Issue