summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2010-02-23 21:58:58 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2010-02-23 21:58:58 +0000
commit43b47a87d3ae075937b7dc181f8284576e5d73ac (patch)
tree6baafd49e6b11a8e05cabe2da29d865f31fe3e85
parentea3853e8d294deebe47d7845b332bef5dbe5f03e (diff)
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
-rw-r--r--tests/modeltests/aggregation/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/modeltests/aggregation/models.py b/tests/modeltests/aggregation/models.py
index 0e8d8816e6..e5f0f5d318 100644
--- a/tests/modeltests/aggregation/models.py
+++ b/tests/modeltests/aggregation/models.py
@@ -362,7 +362,8 @@ 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)]
+>>> qs = Book.objects.values_list('price').annotate(count=Count('price')).order_by('-count', 'price')
+>>> list(qs) == [(Decimal('29.69'), 2), (Decimal('23.09'), 1), (Decimal('30'), 1), (Decimal('75'), 1), (Decimal('82.8'), 1)]
+True
"""}