mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #30446 -- Removed unnecessary Value(..., output_field) in docs and tests.
This commit is contained in:
committed by
Mariusz Felisiak
parent
1e38f1191d
commit
156a2138db
@@ -374,7 +374,7 @@ class AggregationTests(TestCase):
|
||||
# Conditional aggregation of a grouped queryset.
|
||||
self.assertEqual(
|
||||
Book.objects.annotate(c=Count('authors')).values('pk').aggregate(test=Sum(
|
||||
Case(When(c__gt=1, then=1), output_field=IntegerField())
|
||||
Case(When(c__gt=1, then=1))
|
||||
))['test'],
|
||||
3
|
||||
)
|
||||
@@ -382,7 +382,7 @@ class AggregationTests(TestCase):
|
||||
def test_sliced_conditional_aggregate(self):
|
||||
self.assertEqual(
|
||||
Author.objects.all()[:5].aggregate(test=Sum(Case(
|
||||
When(age__lte=35, then=1), output_field=IntegerField()
|
||||
When(age__lte=35, then=1)
|
||||
)))['test'],
|
||||
3
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user