Reolink 100% test coverage (#94763)
This commit is contained in:
parent
e209f3723e
commit
92cf6ed2a0
3 changed files with 42 additions and 24 deletions
|
@ -58,18 +58,16 @@ def reolink_connect(mock_get_source_ip: None) -> Generator[MagicMock, None, None
|
|||
host_mock.is_admin = True
|
||||
host_mock.user_level = "admin"
|
||||
host_mock.sw_version_update_required = False
|
||||
host_mock.hardware_version = "IPC_00000"
|
||||
host_mock.sw_version = "v1.0.0.0.0.0000"
|
||||
host_mock.manufacturer = "Reolink"
|
||||
host_mock.model = "RLC-123"
|
||||
host_mock.session_active = True
|
||||
host_mock.timeout = 60
|
||||
host_mock.renewtimer.return_value = 600
|
||||
yield host_mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def reolink_ONVIF_wait() -> Generator[None, None, None]:
|
||||
"""Mock reolink connection."""
|
||||
with patch("homeassistant.components.reolink.host.asyncio.Event.wait", AsyncMock()):
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def reolink_platforms(mock_get_source_ip: None) -> Generator[None, None, None]:
|
||||
"""Mock reolink entry setup."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue