Tests: Fix two flaky tests (#4557)

* Test: Fix test that relies on unstable database result order

* Tests: Fix test that fails between 0am and 1am
This commit is contained in:
Raphael Michel
2024-10-25 17:04:16 +02:00
committed by GitHub
parent 565f5e2ea7
commit 0cd1290624
3 changed files with 5 additions and 5 deletions

View File

@@ -156,7 +156,7 @@ def event_list(request):
max_fromto=Greatest(Max('subevents__date_to'), Max('subevents__date_from'))
).annotate(
order_from=Coalesce('min_from', 'date_from'),
).order_by('-order_from')
).order_by('-order_from', 'slug')
total = qs.count()
pagesize = 20
@@ -318,7 +318,7 @@ def nav_context_list(request):
max_fromto=Greatest(Max('subevents__date_to'), Max('subevents__date_from'))
).annotate(
order_from=Coalesce('min_from', 'date_from'),
).order_by('-order_from')
).order_by('-order_from', 'slug')
if request.user.has_active_staff_session(request.session.session_key):
qs_orga = Organizer.objects.all()