mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Replace assert_lists_same with pytest_unordered in integrations a-f (#94900)
This commit is contained in:
@@ -3,6 +3,7 @@ from datetime import timedelta
|
||||
|
||||
from freezegun import freeze_time
|
||||
import pytest
|
||||
from pytest_unordered import unordered
|
||||
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.binary_sensor import DOMAIN, BinarySensorDeviceClass
|
||||
@@ -16,7 +17,6 @@ import homeassistant.util.dt as dt_util
|
||||
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
assert_lists_same,
|
||||
async_get_device_automation_capabilities,
|
||||
async_get_device_automations,
|
||||
async_mock_service,
|
||||
@@ -75,7 +75,7 @@ async def test_get_conditions(
|
||||
conditions = await async_get_device_automations(
|
||||
hass, DeviceAutomationType.CONDITION, device_entry.id
|
||||
)
|
||||
assert_lists_same(conditions, expected_conditions)
|
||||
assert conditions == unordered(expected_conditions)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -123,7 +123,7 @@ async def test_get_conditions_hidden_auxiliary(
|
||||
conditions = await async_get_device_automations(
|
||||
hass, DeviceAutomationType.CONDITION, device_entry.id
|
||||
)
|
||||
assert_lists_same(conditions, expected_conditions)
|
||||
assert conditions == unordered(expected_conditions)
|
||||
|
||||
|
||||
async def test_get_conditions_no_state(
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
from datetime import timedelta
|
||||
|
||||
import pytest
|
||||
from pytest_unordered import unordered
|
||||
|
||||
import homeassistant.components.automation as automation
|
||||
from homeassistant.components.binary_sensor import DOMAIN, BinarySensorDeviceClass
|
||||
@@ -15,7 +16,6 @@ import homeassistant.util.dt as dt_util
|
||||
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
assert_lists_same,
|
||||
async_fire_time_changed,
|
||||
async_get_device_automation_capabilities,
|
||||
async_get_device_automations,
|
||||
@@ -75,7 +75,7 @@ async def test_get_triggers(
|
||||
triggers = await async_get_device_automations(
|
||||
hass, DeviceAutomationType.TRIGGER, device_entry.id
|
||||
)
|
||||
assert_lists_same(triggers, expected_triggers)
|
||||
assert triggers == unordered(expected_triggers)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -123,7 +123,7 @@ async def test_get_triggers_hidden_auxiliary(
|
||||
triggers = await async_get_device_automations(
|
||||
hass, DeviceAutomationType.TRIGGER, device_entry.id
|
||||
)
|
||||
assert_lists_same(triggers, expected_triggers)
|
||||
assert triggers == unordered(expected_triggers)
|
||||
|
||||
|
||||
async def test_get_triggers_no_state(
|
||||
@@ -168,7 +168,7 @@ async def test_get_triggers_no_state(
|
||||
triggers = await async_get_device_automations(
|
||||
hass, DeviceAutomationType.TRIGGER, device_entry.id
|
||||
)
|
||||
assert_lists_same(triggers, expected_triggers)
|
||||
assert triggers == unordered(expected_triggers)
|
||||
|
||||
|
||||
async def test_get_trigger_capabilities(
|
||||
|
||||
Reference in New Issue
Block a user