mirror of https://github.com/django/django.git
Fixed #12948. Removed a test dependency on the formatting of Decimals. Thanks, coleifer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12551 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ea3853e8d2
commit
43b47a87d3
|
@ -362,7 +362,8 @@ True
|
||||||
>>> Book.objects.filter(pk=1).annotate(mean_age=Avg('authors__age')).values_list('mean_age', flat=True)
|
>>> Book.objects.filter(pk=1).annotate(mean_age=Avg('authors__age')).values_list('mean_age', flat=True)
|
||||||
[34.5]
|
[34.5]
|
||||||
|
|
||||||
>>> Book.objects.values_list('price').annotate(count=Count('price')).order_by('-count', 'price')
|
>>> qs = Book.objects.values_list('price').annotate(count=Count('price')).order_by('-count', 'price')
|
||||||
[(Decimal('29.69'), 2), (Decimal('23.09'), 1), (Decimal('30'), 1), (Decimal('75'), 1), (Decimal('82.8'), 1)]
|
>>> list(qs) == [(Decimal('29.69'), 2), (Decimal('23.09'), 1), (Decimal('30'), 1), (Decimal('75'), 1), (Decimal('82.8'), 1)]
|
||||||
|
True
|
||||||
|
|
||||||
"""}
|
"""}
|
||||||
|
|
Loading…
Reference in New Issue