From 9d050360c8446dab3caa0c782d9b34d2c9bdf6f3 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 19 May 2025 14:18:35 +0200 Subject: [PATCH] Prevent import from syrupy.SnapshotAssertion (#145208) --- tests/components/apsystems/test_binary_sensor.py | 2 +- tests/components/apsystems/test_number.py | 2 +- tests/components/apsystems/test_sensor.py | 2 +- tests/components/apsystems/test_switch.py | 2 +- tests/components/august/test_binary_sensor.py | 2 +- tests/components/august/test_lock.py | 2 +- tests/components/co2signal/test_diagnostics.py | 2 +- tests/components/co2signal/test_sensor.py | 2 +- tests/components/easyenergy/test_diagnostics.py | 2 +- tests/components/mold_indicator/test_config_flow.py | 2 +- tests/components/ohme/test_button.py | 2 +- tests/components/ohme/test_diagnostics.py | 2 +- tests/components/ohme/test_init.py | 2 +- tests/components/ohme/test_number.py | 2 +- tests/components/ohme/test_select.py | 2 +- tests/components/ohme/test_sensor.py | 2 +- tests/components/ohme/test_switch.py | 2 +- tests/components/ohme/test_time.py | 2 +- tests/components/poolsense/test_binary_sensor.py | 2 +- tests/components/poolsense/test_sensor.py | 2 +- tests/components/rdw/test_diagnostics.py | 2 +- tests/components/smartthings/__init__.py | 2 +- tests/components/smartthings/test_binary_sensor.py | 2 +- tests/components/smartthings/test_button.py | 2 +- tests/components/smartthings/test_climate.py | 2 +- tests/components/smartthings/test_cover.py | 2 +- tests/components/smartthings/test_diagnostics.py | 2 +- tests/components/smartthings/test_event.py | 2 +- tests/components/smartthings/test_fan.py | 2 +- tests/components/smartthings/test_init.py | 2 +- tests/components/smartthings/test_light.py | 2 +- tests/components/smartthings/test_lock.py | 2 +- tests/components/smartthings/test_media_player.py | 2 +- tests/components/smartthings/test_number.py | 2 +- tests/components/smartthings/test_scene.py | 2 +- tests/components/smartthings/test_select.py | 2 +- tests/components/smartthings/test_sensor.py | 2 +- tests/components/smartthings/test_switch.py | 2 +- tests/components/smartthings/test_update.py | 2 +- tests/components/smartthings/test_valve.py | 2 +- tests/components/smartthings/test_water_heater.py | 2 +- tests/components/synology_dsm/test_config_flow.py | 2 +- tests/components/tag/test_init.py | 2 +- tests/ruff.toml | 1 + 44 files changed, 44 insertions(+), 43 deletions(-) diff --git a/tests/components/apsystems/test_binary_sensor.py b/tests/components/apsystems/test_binary_sensor.py index 0c6fbffc93c..88e482e3eaa 100644 --- a/tests/components/apsystems/test_binary_sensor.py +++ b/tests/components/apsystems/test_binary_sensor.py @@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, patch -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/tests/components/apsystems/test_number.py b/tests/components/apsystems/test_number.py index 912759b4a17..6cf054148bf 100644 --- a/tests/components/apsystems/test_number.py +++ b/tests/components/apsystems/test_number.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, patch from freezegun.api import FrozenDateTimeFactory import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.number import ( ATTR_VALUE, diff --git a/tests/components/apsystems/test_sensor.py b/tests/components/apsystems/test_sensor.py index 810ad3e7bdf..9a87e7ecf18 100644 --- a/tests/components/apsystems/test_sensor.py +++ b/tests/components/apsystems/test_sensor.py @@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, patch -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/tests/components/apsystems/test_switch.py b/tests/components/apsystems/test_switch.py index afd889fe958..290cece126d 100644 --- a/tests/components/apsystems/test_switch.py +++ b/tests/components/apsystems/test_switch.py @@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, patch -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/tests/components/august/test_binary_sensor.py b/tests/components/august/test_binary_sensor.py index bcdd4d55330..563221635f8 100644 --- a/tests/components/august/test_binary_sensor.py +++ b/tests/components/august/test_binary_sensor.py @@ -4,7 +4,7 @@ import datetime from unittest.mock import Mock from freezegun.api import FrozenDateTimeFactory -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from yalexs.pubnub_async import AugustPubNub from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN diff --git a/tests/components/august/test_lock.py b/tests/components/august/test_lock.py index 065ffef91ff..a1ba83ecb01 100644 --- a/tests/components/august/test_lock.py +++ b/tests/components/august/test_lock.py @@ -6,7 +6,7 @@ from unittest.mock import Mock from aiohttp import ClientResponseError from freezegun.api import FrozenDateTimeFactory import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from yalexs.manager.activity import INITIAL_LOCK_RESYNC_TIME from yalexs.pubnub_async import AugustPubNub diff --git a/tests/components/co2signal/test_diagnostics.py b/tests/components/co2signal/test_diagnostics.py index 3d5e1a0580b..3ede845f01f 100644 --- a/tests/components/co2signal/test_diagnostics.py +++ b/tests/components/co2signal/test_diagnostics.py @@ -1,7 +1,7 @@ """Test the CO2Signal diagnostics.""" import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from syrupy.filters import props from homeassistant.core import HomeAssistant diff --git a/tests/components/co2signal/test_sensor.py b/tests/components/co2signal/test_sensor.py index fddda17f3ed..2154782f62d 100644 --- a/tests/components/co2signal/test_sensor.py +++ b/tests/components/co2signal/test_sensor.py @@ -11,7 +11,7 @@ from aioelectricitymaps import ( ) from freezegun.api import FrozenDateTimeFactory import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er diff --git a/tests/components/easyenergy/test_diagnostics.py b/tests/components/easyenergy/test_diagnostics.py index d0eb9de3b00..8b9d850d98c 100644 --- a/tests/components/easyenergy/test_diagnostics.py +++ b/tests/components/easyenergy/test_diagnostics.py @@ -4,7 +4,7 @@ from unittest.mock import MagicMock from easyenergy import EasyEnergyNoDataError import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.homeassistant import SERVICE_UPDATE_ENTITY from homeassistant.const import ATTR_ENTITY_ID diff --git a/tests/components/mold_indicator/test_config_flow.py b/tests/components/mold_indicator/test_config_flow.py index bb8362b5e0d..aca6e37ff92 100644 --- a/tests/components/mold_indicator/test_config_flow.py +++ b/tests/components/mold_indicator/test_config_flow.py @@ -5,7 +5,7 @@ from __future__ import annotations from unittest.mock import AsyncMock import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant import config_entries from homeassistant.components.mold_indicator.const import ( diff --git a/tests/components/ohme/test_button.py b/tests/components/ohme/test_button.py index 1728563b2e9..70dab600b6d 100644 --- a/tests/components/ohme/test_button.py +++ b/tests/components/ohme/test_button.py @@ -5,7 +5,7 @@ from unittest.mock import MagicMock, patch from freezegun.api import FrozenDateTimeFactory from ohme import ChargerStatus -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS from homeassistant.const import ( diff --git a/tests/components/ohme/test_diagnostics.py b/tests/components/ohme/test_diagnostics.py index 6aab1262189..25ee5ae10db 100644 --- a/tests/components/ohme/test_diagnostics.py +++ b/tests/components/ohme/test_diagnostics.py @@ -2,7 +2,7 @@ from unittest.mock import MagicMock -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.core import HomeAssistant diff --git a/tests/components/ohme/test_init.py b/tests/components/ohme/test_init.py index 0f4c7cd64ee..7d9d388867f 100644 --- a/tests/components/ohme/test_init.py +++ b/tests/components/ohme/test_init.py @@ -2,7 +2,7 @@ from unittest.mock import MagicMock -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.ohme.const import DOMAIN from homeassistant.config_entries import ConfigEntryState diff --git a/tests/components/ohme/test_number.py b/tests/components/ohme/test_number.py index 9cfce2a850f..e162cd337ae 100644 --- a/tests/components/ohme/test_number.py +++ b/tests/components/ohme/test_number.py @@ -2,7 +2,7 @@ from unittest.mock import MagicMock, patch -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.number import ( ATTR_VALUE, diff --git a/tests/components/ohme/test_select.py b/tests/components/ohme/test_select.py index 5aeebc1f477..1f0225fd70f 100644 --- a/tests/components/ohme/test_select.py +++ b/tests/components/ohme/test_select.py @@ -3,7 +3,7 @@ from unittest.mock import AsyncMock, MagicMock, patch from ohme import ChargerMode -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.const import STATE_UNAVAILABLE, Platform from homeassistant.core import HomeAssistant diff --git a/tests/components/ohme/test_sensor.py b/tests/components/ohme/test_sensor.py index 8fc9edddcf9..b7c8f82aafc 100644 --- a/tests/components/ohme/test_sensor.py +++ b/tests/components/ohme/test_sensor.py @@ -6,7 +6,7 @@ from unittest.mock import MagicMock, patch from freezegun.api import FrozenDateTimeFactory from ohme import ApiException import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.const import STATE_UNAVAILABLE, Platform from homeassistant.core import HomeAssistant diff --git a/tests/components/ohme/test_switch.py b/tests/components/ohme/test_switch.py index 8d82a5a3ea4..976b5cfcccd 100644 --- a/tests/components/ohme/test_switch.py +++ b/tests/components/ohme/test_switch.py @@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, MagicMock, patch -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.switch import ( DOMAIN as SWITCH_DOMAIN, diff --git a/tests/components/ohme/test_time.py b/tests/components/ohme/test_time.py index 0562dfa124c..8c604e19086 100644 --- a/tests/components/ohme/test_time.py +++ b/tests/components/ohme/test_time.py @@ -2,7 +2,7 @@ from unittest.mock import MagicMock, patch -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.time import ( ATTR_TIME, diff --git a/tests/components/poolsense/test_binary_sensor.py b/tests/components/poolsense/test_binary_sensor.py index 4d10413c124..debf0faa52a 100644 --- a/tests/components/poolsense/test_binary_sensor.py +++ b/tests/components/poolsense/test_binary_sensor.py @@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, patch -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/tests/components/poolsense/test_sensor.py b/tests/components/poolsense/test_sensor.py index 7f088eee6a3..bac5dd8c701 100644 --- a/tests/components/poolsense/test_sensor.py +++ b/tests/components/poolsense/test_sensor.py @@ -2,7 +2,7 @@ from unittest.mock import AsyncMock, patch -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.const import Platform from homeassistant.core import HomeAssistant diff --git a/tests/components/rdw/test_diagnostics.py b/tests/components/rdw/test_diagnostics.py index a5e8c72dba1..0f4a2279993 100644 --- a/tests/components/rdw/test_diagnostics.py +++ b/tests/components/rdw/test_diagnostics.py @@ -1,6 +1,6 @@ """Tests for the diagnostics data provided by the RDW integration.""" -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.core import HomeAssistant diff --git a/tests/components/smartthings/__init__.py b/tests/components/smartthings/__init__.py index f316db7bef8..3395f7f4673 100644 --- a/tests/components/smartthings/__init__.py +++ b/tests/components/smartthings/__init__.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability, DeviceEvent, DeviceHealthEvent from pysmartthings.models import HealthStatus -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.smartthings.const import MAIN from homeassistant.const import Platform diff --git a/tests/components/smartthings/test_binary_sensor.py b/tests/components/smartthings/test_binary_sensor.py index 22ca94df81a..42534e5b691 100644 --- a/tests/components/smartthings/test_binary_sensor.py +++ b/tests/components/smartthings/test_binary_sensor.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components import automation, script from homeassistant.components.automation import automations_with_entity diff --git a/tests/components/smartthings/test_button.py b/tests/components/smartthings/test_button.py index 5c5f98912e2..daacee7def1 100644 --- a/tests/components/smartthings/test_button.py +++ b/tests/components/smartthings/test_button.py @@ -6,7 +6,7 @@ from freezegun.api import FrozenDateTimeFactory from pysmartthings import Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS from homeassistant.components.smartthings import MAIN diff --git a/tests/components/smartthings/test_climate.py b/tests/components/smartthings/test_climate.py index 9e3fa22f55d..ff8b5277e20 100644 --- a/tests/components/smartthings/test_climate.py +++ b/tests/components/smartthings/test_climate.py @@ -6,7 +6,7 @@ from unittest.mock import AsyncMock, call from pysmartthings import Attribute, Capability, Command, Status from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.climate import ( ATTR_CURRENT_HUMIDITY, diff --git a/tests/components/smartthings/test_cover.py b/tests/components/smartthings/test_cover.py index 559c6821204..ad6fc762c3c 100644 --- a/tests/components/smartthings/test_cover.py +++ b/tests/components/smartthings/test_cover.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability, Command, Status from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, diff --git a/tests/components/smartthings/test_diagnostics.py b/tests/components/smartthings/test_diagnostics.py index b28a3a1aff5..4eba6593a7f 100644 --- a/tests/components/smartthings/test_diagnostics.py +++ b/tests/components/smartthings/test_diagnostics.py @@ -3,7 +3,7 @@ from unittest.mock import AsyncMock, patch import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from syrupy.filters import props from homeassistant.components.smartthings.const import DOMAIN diff --git a/tests/components/smartthings/test_event.py b/tests/components/smartthings/test_event.py index b9a6fc8be86..96b66036906 100644 --- a/tests/components/smartthings/test_event.py +++ b/tests/components/smartthings/test_event.py @@ -6,7 +6,7 @@ from freezegun.api import FrozenDateTimeFactory from pysmartthings import Attribute, Capability from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.event import ATTR_EVENT_TYPES from homeassistant.const import STATE_UNAVAILABLE, STATE_UNKNOWN, Platform diff --git a/tests/components/smartthings/test_fan.py b/tests/components/smartthings/test_fan.py index 04196417690..36a453ff595 100644 --- a/tests/components/smartthings/test_fan.py +++ b/tests/components/smartthings/test_fan.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.fan import ( ATTR_PERCENTAGE, diff --git a/tests/components/smartthings/test_init.py b/tests/components/smartthings/test_init.py index fcb962449bf..0b8d2e1e632 100644 --- a/tests/components/smartthings/test_init.py +++ b/tests/components/smartthings/test_init.py @@ -13,7 +13,7 @@ from pysmartthings import ( Subscription, ) import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.binary_sensor import DOMAIN as BINARY_SENSOR_DOMAIN from homeassistant.components.climate import DOMAIN as CLIMATE_DOMAIN, HVACMode diff --git a/tests/components/smartthings/test_light.py b/tests/components/smartthings/test_light.py index 46f8f3ae7a3..0aa818dd7f4 100644 --- a/tests/components/smartthings/test_light.py +++ b/tests/components/smartthings/test_light.py @@ -6,7 +6,7 @@ from unittest.mock import AsyncMock, call from pysmartthings import Attribute, Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.light import ( ATTR_BRIGHTNESS, diff --git a/tests/components/smartthings/test_lock.py b/tests/components/smartthings/test_lock.py index 48e83f479fa..54932e1094e 100644 --- a/tests/components/smartthings/test_lock.py +++ b/tests/components/smartthings/test_lock.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN, LockState from homeassistant.components.smartthings.const import MAIN diff --git a/tests/components/smartthings/test_media_player.py b/tests/components/smartthings/test_media_player.py index e3f3652c0ed..0fb53e642d4 100644 --- a/tests/components/smartthings/test_media_player.py +++ b/tests/components/smartthings/test_media_player.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability, Command, Status from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.media_player import ( ATTR_INPUT_SOURCE, diff --git a/tests/components/smartthings/test_number.py b/tests/components/smartthings/test_number.py index fa485776c37..f9dfe4d3228 100644 --- a/tests/components/smartthings/test_number.py +++ b/tests/components/smartthings/test_number.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.number import ( ATTR_VALUE, diff --git a/tests/components/smartthings/test_scene.py b/tests/components/smartthings/test_scene.py index 7ef287b9e96..5eb055f96f0 100644 --- a/tests/components/smartthings/test_scene.py +++ b/tests/components/smartthings/test_scene.py @@ -2,7 +2,7 @@ from unittest.mock import AsyncMock -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.scene import DOMAIN as SCENE_DOMAIN from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_ON, Platform diff --git a/tests/components/smartthings/test_select.py b/tests/components/smartthings/test_select.py index da27565ead5..3e1746331f9 100644 --- a/tests/components/smartthings/test_select.py +++ b/tests/components/smartthings/test_select.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.select import ( ATTR_OPTION, diff --git a/tests/components/smartthings/test_sensor.py b/tests/components/smartthings/test_sensor.py index 04ad85ef02d..bfb203c1485 100644 --- a/tests/components/smartthings/test_sensor.py +++ b/tests/components/smartthings/test_sensor.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components import automation, script from homeassistant.components.automation import automations_with_entity diff --git a/tests/components/smartthings/test_switch.py b/tests/components/smartthings/test_switch.py index 2be2c670faf..09f710366d0 100644 --- a/tests/components/smartthings/test_switch.py +++ b/tests/components/smartthings/test_switch.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components import automation, script from homeassistant.components.automation import automations_with_entity diff --git a/tests/components/smartthings/test_update.py b/tests/components/smartthings/test_update.py index e4b360e0398..960e8bfb6d7 100644 --- a/tests/components/smartthings/test_update.py +++ b/tests/components/smartthings/test_update.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.smartthings.const import MAIN from homeassistant.components.update import ( diff --git a/tests/components/smartthings/test_valve.py b/tests/components/smartthings/test_valve.py index 9d2cef65035..9aff2dc09be 100644 --- a/tests/components/smartthings/test_valve.py +++ b/tests/components/smartthings/test_valve.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock from pysmartthings import Attribute, Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.smartthings import MAIN from homeassistant.components.valve import DOMAIN as VALVE_DOMAIN, ValveState diff --git a/tests/components/smartthings/test_water_heater.py b/tests/components/smartthings/test_water_heater.py index 54df6aa12e6..a12280e5c92 100644 --- a/tests/components/smartthings/test_water_heater.py +++ b/tests/components/smartthings/test_water_heater.py @@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, call from pysmartthings import Attribute, Capability, Command from pysmartthings.models import HealthStatus import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.smartthings import MAIN from homeassistant.components.water_heater import ( diff --git a/tests/components/synology_dsm/test_config_flow.py b/tests/components/synology_dsm/test_config_flow.py index 932cf057d3d..f2aa6df802e 100644 --- a/tests/components/synology_dsm/test_config_flow.py +++ b/tests/components/synology_dsm/test_config_flow.py @@ -12,7 +12,7 @@ from synology_dsm.exceptions import ( SynologyDSMLoginInvalidException, SynologyDSMRequestException, ) -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from homeassistant.components.synology_dsm.config_flow import CONF_OTP_CODE from homeassistant.components.synology_dsm.const import ( diff --git a/tests/components/tag/test_init.py b/tests/components/tag/test_init.py index ac862e59f2d..25b1e116c04 100644 --- a/tests/components/tag/test_init.py +++ b/tests/components/tag/test_init.py @@ -5,7 +5,7 @@ from typing import Any from freezegun.api import FrozenDateTimeFactory import pytest -from syrupy import SnapshotAssertion +from syrupy.assertion import SnapshotAssertion from syrupy.filters import props from homeassistant.components.tag import DOMAIN, _create_entry, async_scan_tag diff --git a/tests/ruff.toml b/tests/ruff.toml index c56b8f68ffc..b22f39f1525 100644 --- a/tests/ruff.toml +++ b/tests/ruff.toml @@ -13,6 +13,7 @@ extend-ignore = [ [lint.flake8-tidy-imports.banned-api] "async_timeout".msg = "use asyncio.timeout instead" "pytz".msg = "use zoneinfo instead" +"syrupy.SnapshotAssertion".msg = "use syrupy.assertion.SnapshotAssertion instead" [lint.isort] known-first-party = [