mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Fix dlna_dms test RuntimeWarning (#120341)
This commit is contained in:
parent
1e16afb43b
commit
f1ddf80dff
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from collections.abc import AsyncIterable, Iterable
|
||||
from typing import Final, cast
|
||||
from unittest.mock import Mock, create_autospec, patch, seal
|
||||
from unittest.mock import AsyncMock, MagicMock, Mock, create_autospec, patch, seal
|
||||
|
||||
from async_upnp_client.client import UpnpDevice, UpnpService
|
||||
from async_upnp_client.utils import absolute_url
|
||||
@ -87,6 +87,8 @@ def aiohttp_session_requester_mock() -> Iterable[Mock]:
|
||||
with patch(
|
||||
"homeassistant.components.dlna_dms.dms.AiohttpSessionRequester", autospec=True
|
||||
) as requester_mock:
|
||||
requester_mock.return_value = mock = AsyncMock()
|
||||
mock.async_http_request.return_value.body = MagicMock()
|
||||
yield requester_mock
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user