Skip to content
Snippets Groups Projects
Unverified Commit 6de824e8 authored by Marc Mueller's avatar Marc Mueller Committed by GitHub
Browse files

Fix test RuntimeWarning for upb (#122325)

parent 273dc099
No related branches found
No related tags found
No related merge requests found
"""Test the UPB Control config flow."""
from asyncio import TimeoutError
from unittest.mock import AsyncMock, PropertyMock, patch
from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch
from homeassistant import config_entries
from homeassistant.components.upb.const import DOMAIN
......@@ -18,6 +18,7 @@ def mocked_upb(sync_complete=True, config_ok=True):
upb_mock = AsyncMock()
type(upb_mock).network_id = PropertyMock(return_value="42")
type(upb_mock).config_ok = PropertyMock(return_value=config_ok)
type(upb_mock).disconnect = MagicMock()
if sync_complete:
upb_mock.async_connect.side_effect = _upb_lib_connect
return patch(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment