mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user