Skip to content

Commit fb35eff

Browse files
committed
Test: Make assert more verbose
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent cef414d commit fb35eff

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,15 @@ async def test_list_dispatches(
9898
dispatches = client.list(microgrid_id=1)
9999
async for page in dispatches:
100100
for dispatch in page:
101-
assert dispatch in client.dispatches(microgrid_id=1)
101+
service_side_dispatch = next(
102+
filter(
103+
lambda d: d.id == dispatch.id,
104+
client.dispatches(microgrid_id=1),
105+
),
106+
None,
107+
)
108+
109+
assert dispatch == service_side_dispatch
102110

103111

104112
async def test_list_dispatches_no_duration(

0 commit comments

Comments
 (0)