From 2ce9d1a206036313a4309691c77c3c10d8757b30 Mon Sep 17 00:00:00 2001 From: Agate Berriot Date: Thu, 18 Aug 2022 14:37:36 +0200 Subject: [PATCH] misc: fixed flaky test on /api/agendas/recurring-events/ --- tests/api/datetimes/test_recurring_events.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/api/datetimes/test_recurring_events.py b/tests/api/datetimes/test_recurring_events.py index 4c37cf5..d02ab74 100644 --- a/tests/api/datetimes/test_recurring_events.py +++ b/tests/api/datetimes/test_recurring_events.py @@ -546,18 +546,18 @@ def test_recurring_events_api_list_overlapping_events(app): resp = app.get( '/api/agendas/recurring-events/?agendas=first-agenda,second-agenda&sort=day&check_overlaps=true' ) - assert [(x['id'], x['overlaps']) for x in resp.json['data']] == [ - ('first-agenda@event-12-14:1', ['second-agenda@event-12-18:1']), + assert [(x['id'], set(x['overlaps'])) for x in resp.json['data']] == [ + ('first-agenda@event-12-14:1', set(['second-agenda@event-12-18:1'])), ( 'second-agenda@event-12-18:1', - ['first-agenda@event-12-14:1', 'first-agenda@event-14-15:1', 'first-agenda@event-15-17:1'], + set(['first-agenda@event-12-14:1', 'first-agenda@event-14-15:1', 'first-agenda@event-15-17:1']), ), - ('first-agenda@event-14-15:1', ['second-agenda@event-12-18:1']), - ('first-agenda@event-15-17:1', ['second-agenda@event-12-18:1']), - ('first-agenda@event-15-17:3', []), - ('second-agenda@event-12-18:5', ['first-agenda@event-15-17:5']), - ('second-agenda@no-duration:5', []), - ('first-agenda@event-15-17:5', ['second-agenda@event-12-18:5']), + ('first-agenda@event-14-15:1', set(['second-agenda@event-12-18:1'])), + ('first-agenda@event-15-17:1', set(['second-agenda@event-12-18:1'])), + ('first-agenda@event-15-17:3', set()), + ('second-agenda@event-12-18:5', set(['first-agenda@event-15-17:5'])), + ('second-agenda@no-duration:5', set()), + ('first-agenda@event-15-17:5', set(['second-agenda@event-12-18:5'])), ] resp = app.get('/api/agendas/recurring-events/?agendas=first-agenda,second-agenda&sort=day') -- 2.36.1