diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-10-28 10:43:54 -0400 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-10-28 11:40:01 -0400 |
| commit | 43933a1dca07047e95ec990d9289d0212668009e (patch) | |
| tree | 5e7145a24bd05e1e1af8587f4e442c5343191dea /tests/aggregation_regress/tests.py | |
| parent | 9ba3f74a46d15f9f2f45ad4ef8cdd245a888e58e (diff) | |
Reverted "Fixed #26434 -- Removed faulty clearing of ordering field when missing from explicit grouping."
This reverts commit ea3a71c2d09f8281d8a50ed20e40e1fb13db5cd9.
The implementation was flawed, as self.group_by contains Cols, not aliases.
Diffstat (limited to 'tests/aggregation_regress/tests.py')
| -rw-r--r-- | tests/aggregation_regress/tests.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/aggregation_regress/tests.py b/tests/aggregation_regress/tests.py index 5f17169dc6..3e1a6a71f9 100644 --- a/tests/aggregation_regress/tests.py +++ b/tests/aggregation_regress/tests.py @@ -171,25 +171,6 @@ class AggregationTests(TestCase): for attr, value in kwargs.items(): self.assertEqual(getattr(obj, attr), value) - def test_count_preserve_group_by(self): - # new release of the same book - Book.objects.create( - isbn="113235613", - name=self.b4.name, - pages=self.b4.pages, - rating=4.0, - price=Decimal("39.69"), - contact=self.a5, - publisher=self.p3, - pubdate=datetime.date(2018, 11, 3), - ) - qs = Book.objects.values("contact__name", "publisher__name").annotate( - publications=Count("id") - ) - self.assertEqual(qs.count(), Book.objects.count() - 1) - self.assertEqual(qs.order_by("id").count(), Book.objects.count()) - self.assertEqual(qs.extra(order_by=["id"]).count(), Book.objects.count()) - def test_annotation_with_value(self): values = ( Book.objects.filter( |
