From ec7f0bcf79dec7412d00d48e43c995a45b3b7b70 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Fri, 23 May 2025 01:00:29 -0400 Subject: [PATCH] Refs #35444 -- Adjusted multi-args distinct aggregate test ordering expectations. Unless an explicit order_by is specified for the test the ordering of the aggregation results is undefined. --- tests/aggregation/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py index db61716e2e..6d284da63d 100644 --- a/tests/aggregation/tests.py +++ b/tests/aggregation/tests.py @@ -576,7 +576,7 @@ class AggregateTestCase(TestCase): books = Book.objects.aggregate( ratings=StringAgg(Cast(F("rating"), CharField()), Value(","), distinct=True) ) - self.assertEqual(books["ratings"], "3,4,4.5,5") + self.assertCountEqual(books["ratings"].split(","), ["3", "4", "4.5", "5"]) @skipIfDBFeature("supports_aggregate_distinct_multiple_argument") def test_raises_error_on_multiple_argument_distinct(self):