simplify test

This commit is contained in:
mib1185
2025-06-22 13:47:04 +00:00
parent d0abcd0986
commit 27def9afc4

View File

@ -2,7 +2,6 @@
from unittest.mock import Mock, patch from unittest.mock import Mock, patch
from aioimmich.server.models import ImmichServerAbout
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
from homeassistant.const import Platform from homeassistant.const import Platform
@ -38,27 +37,7 @@ async def test_update_min_version(
) -> None: ) -> None:
"""Test the Immich update platform with min version not installed.""" """Test the Immich update platform with min version not installed."""
mock_immich.server.async_get_about_info.return_value = ImmichServerAbout.from_dict( mock_immich.server.async_get_about_info.return_value.version = "v1.132.3"
{
"version": "v1.132.3",
"versionUrl": "https://github.com/immich-app/immich/releases/tag/v1.132.3",
"licensed": False,
"build": "14709928600",
"buildUrl": "https://github.com/immich-app/immich/actions/runs/14709928600",
"buildImage": "v1.132.3",
"buildImageUrl": "https://github.com/immich-app/immich/pkgs/container/immich-server",
"repository": "immich-app/immich",
"repositoryUrl": "https://github.com/immich-app/immich",
"sourceRef": "v1.132.3",
"sourceCommit": "02994883fe3f3972323bb6759d0170a4062f5236",
"sourceUrl": "https://github.com/immich-app/immich/commit/02994883fe3f3972323bb6759d0170a4062f5236",
"nodejs": "v22.14.0",
"exiftool": "13.00",
"ffmpeg": "7.0.2-7",
"libvips": "8.16.1",
"imagemagick": "7.1.1-47",
}
)
with patch("homeassistant.components.immich.PLATFORMS", [Platform.UPDATE]): with patch("homeassistant.components.immich.PLATFORMS", [Platform.UPDATE]):
await setup_integration(hass, mock_config_entry) await setup_integration(hass, mock_config_entry)