diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py index 1958b995b2..af6790fe1f 100644 --- a/tests/lookup/tests.py +++ b/tests/lookup/tests.py @@ -966,6 +966,6 @@ class LookupTests(TestCase): 'name', ).annotate( max_id=Max('id'), - ).values('max_id') + ).values('max_id').order_by() authors = Author.objects.filter(id=authors_max_ids[:1]) self.assertEqual(authors.get(), newest_author)