Code

Ticket #12948: 12948.diff

File 12948.diff, 804 bytes (added by coleifer, 4 years ago)
Line 
1diff --git a/tests/modeltests/aggregation/models.py b/tests/modeltests/aggregation/models.py
2index 0e8d881..e5f0f5d 100644
3--- a/tests/modeltests/aggregation/models.py
4+++ b/tests/modeltests/aggregation/models.py
5@@ -362,7 +362,8 @@ True
6 >>> Book.objects.filter(pk=1).annotate(mean_age=Avg('authors__age')).values_list('mean_age', flat=True)
7 [34.5]
8 
9->>> Book.objects.values_list('price').annotate(count=Count('price')).order_by('-count', 'price')
10-[(Decimal('29.69'), 2), (Decimal('23.09'), 1), (Decimal('30'), 1), (Decimal('75'), 1), (Decimal('82.8'), 1)]
11+>>> qs = Book.objects.values_list('price').annotate(count=Count('price')).order_by('-count', 'price')
12+>>> list(qs) == [(Decimal('29.69'), 2), (Decimal('23.09'), 1), (Decimal('30'), 1), (Decimal('75'), 1), (Decimal('82.8'), 1)]
13+True
14 
15 """}