Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 43b47a87d3ae075937b7dc181f8284576e5d73ac 1 parent ea3853e
Joseph Kocherhans authored February 23, 2010

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  tests/modeltests/aggregation/models.py
5  tests/modeltests/aggregation/models.py
@@ -362,7 +362,8 @@ def __unicode__(self):
362 362
 >>> Book.objects.filter(pk=1).annotate(mean_age=Avg('authors__age')).values_list('mean_age', flat=True)
363 363
 [34.5]
364 364
 
365  
->>> Book.objects.values_list('price').annotate(count=Count('price')).order_by('-count', 'price')
366  
-[(Decimal('29.69'), 2), (Decimal('23.09'), 1), (Decimal('30'), 1), (Decimal('75'), 1), (Decimal('82.8'), 1)]
  365
+>>> qs = Book.objects.values_list('price').annotate(count=Count('price')).order_by('-count', 'price')
  366
+>>> list(qs) == [(Decimal('29.69'), 2), (Decimal('23.09'), 1), (Decimal('30'), 1), (Decimal('75'), 1), (Decimal('82.8'), 1)]
  367
+True
367 368
 
368 369
 """}

0 notes on commit 43b47a8

Please sign in to comment.
Something went wrong with that request. Please try again.