Michael 4ca39636e2
Backup location feature requires Synology DSM 6.0 and higher (#139106)
* the filestation api requires dsm 6.0

* fix tests
2025-02-23 13:27:14 +01:00

23 lines
521 B
Python

"""Configure Synology DSM tests."""
from __future__ import annotations
from unittest.mock import AsyncMock, Mock
from awesomeversion import AwesomeVersion
from .consts import SERIAL
def mock_dsm_information(
serial: str | None = SERIAL,
update_result: bool = True,
awesome_version: str = "7.2",
) -> Mock:
"""Mock SynologyDSM information."""
return Mock(
serial=serial,
update=AsyncMock(return_value=update_result),
awesome_version=AwesomeVersion(awesome_version),
)