Project

General

Profile

0001-misc-fixed-flaky-test-on-api-agendas-recurring-event.patch

A. B., 18 August 2022 03:00 PM

Download (2.22 KB)

View differences:

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(-)
tests/api/datetimes/test_recurring_events.py
546 546
    resp = app.get(
547 547
        '/api/agendas/recurring-events/?agendas=first-agenda,second-agenda&sort=day&check_overlaps=true'
548 548
    )
549
    assert [(x['id'], x['overlaps']) for x in resp.json['data']] == [
550
        ('first-agenda@event-12-14:1', ['second-agenda@event-12-18:1']),
549
    assert [(x['id'], set(x['overlaps'])) for x in resp.json['data']] == [
550
        ('first-agenda@event-12-14:1', {'second-agenda@event-12-18:1'}),
551 551
        (
552 552
            'second-agenda@event-12-18:1',
553
            ['first-agenda@event-12-14:1', 'first-agenda@event-14-15:1', 'first-agenda@event-15-17:1'],
553
            {'first-agenda@event-12-14:1', 'first-agenda@event-14-15:1', 'first-agenda@event-15-17:1'},
554 554
        ),
555
        ('first-agenda@event-14-15:1', ['second-agenda@event-12-18:1']),
556
        ('first-agenda@event-15-17:1', ['second-agenda@event-12-18:1']),
557
        ('first-agenda@event-15-17:3', []),
558
        ('second-agenda@event-12-18:5', ['first-agenda@event-15-17:5']),
559
        ('second-agenda@no-duration:5', []),
560
        ('first-agenda@event-15-17:5', ['second-agenda@event-12-18:5']),
555
        ('first-agenda@event-14-15:1', {'second-agenda@event-12-18:1'}),
556
        ('first-agenda@event-15-17:1', {'second-agenda@event-12-18:1'}),
557
        ('first-agenda@event-15-17:3', set()),
558
        ('second-agenda@event-12-18:5', {'first-agenda@event-15-17:5'}),
559
        ('second-agenda@no-duration:5', set()),
560
        ('first-agenda@event-15-17:5', {'second-agenda@event-12-18:5'}),
561 561
    ]
562 562

  
563 563
    resp = app.get('/api/agendas/recurring-events/?agendas=first-agenda,second-agenda&sort=day')
564
-