From 28ab45d5d818377c7e83d7c5887f74a4873e27b8 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Fri, 3 May 2024 13:29:05 +0200 Subject: [PATCH] Fix snapcast test warning (#116687) --- tests/components/snapcast/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/components/snapcast/conftest.py b/tests/components/snapcast/conftest.py index 7d29b098482..9e3325bd73a 100644 --- a/tests/components/snapcast/conftest.py +++ b/tests/components/snapcast/conftest.py @@ -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