mirror of
https://github.com/home-assistant/core.git
synced 2025-06-25 01:21:51 +02:00
Prevent import from syrupy.SnapshotAssertion (#145208)
This commit is contained in:
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from syrupy import SnapshotAssertion
|
||||
from syrupy.assertion import SnapshotAssertion
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 (
|
||||
|
@ -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
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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
|
||||
|
@ -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 = [
|
||||
|
Reference in New Issue
Block a user