mirror of
https://github.com/django/django.git
synced 2025-06-12 06:59:13 +00:00
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.
This commit is contained in:
parent
1704c49a9b
commit
ec7f0bcf79
@ -576,7 +576,7 @@ class AggregateTestCase(TestCase):
|
|||||||
books = Book.objects.aggregate(
|
books = Book.objects.aggregate(
|
||||||
ratings=StringAgg(Cast(F("rating"), CharField()), Value(","), distinct=True)
|
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")
|
@skipIfDBFeature("supports_aggregate_distinct_multiple_argument")
|
||||||
def test_raises_error_on_multiple_argument_distinct(self):
|
def test_raises_error_on_multiple_argument_distinct(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user