Replace assert_lists_same with pytest_unordered in integrations t-z (#94903)

This commit is contained in:
Erik Montnemery
2023-06-20 20:23:49 +02:00
committed by GitHub
parent eba04824a4
commit 6183a36fce
12 changed files with 47 additions and 49 deletions

View File

@@ -6,6 +6,7 @@ from typing import Any
from unittest.mock import patch
import pytest
from pytest_unordered import unordered
from homeassistant.bootstrap import async_setup_component
from homeassistant.components.trace.const import DEFAULT_STORED_TRACES
@@ -14,7 +15,7 @@ from homeassistant.core import Context, CoreState, HomeAssistant, callback
from homeassistant.helpers.typing import UNDEFINED
from homeassistant.util.uuid import random_uuid_hex
from tests.common import assert_lists_same, load_fixture
from tests.common import load_fixture
from tests.typing import WebSocketGenerator
@@ -1086,8 +1087,7 @@ async def test_breakpoints(
await client.send_json({"id": next_id(), "type": "trace/debug/breakpoint/list"})
response = await client.receive_json()
assert response["success"]
assert_lists_same(
response["result"],
assert response["result"] == unordered(
[
{"node": f"{prefix}/1", "run_id": "*", "domain": domain, "item_id": "sun"},
{"node": f"{prefix}/5", "run_id": "*", "domain": domain, "item_id": "sun"},