summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2010-02-23 05:26:49 +0000
committerJustin Bronn <jbronn@gmail.com>2010-02-23 05:26:49 +0000
commit5546430304f1310e76b217bb3b6e3597d9b87359 (patch)
tree6383d4ff52fdf7dbec1bcf8b359462ae1412ea3b /tests
parentc4699b0b8a8503e552de1fe4f873685f7037b337 (diff)
Fixed #12608 -- No longer return inconsistent results when using `values` and `values_list` in conjunction with `annotate`. Thanks, Charlie Leifer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/modeltests/aggregation/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/modeltests/aggregation/models.py b/tests/modeltests/aggregation/models.py
index 9ed638ea80..0e8d8816e6 100644
--- a/tests/modeltests/aggregation/models.py
+++ b/tests/modeltests/aggregation/models.py
@@ -362,4 +362,7 @@ True
>>> Book.objects.filter(pk=1).annotate(mean_age=Avg('authors__age')).values_list('mean_age', flat=True)
[34.5]
+>>> 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)]
+
"""}