Skip to content

mcagl/minimal_django_sum_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

I setup a minimal Django project to demonstrate a problem with aggregate(Sum()), and I linked it in this ticket on djangoproject.com: https://code.djangoproject.com/ticket/24385

This is the result of the test:

$ ./manage.py test my_app
Django version: (1, 7, 4, 'final', 0)
Creating test database for alias 'default'...
F..
======================================================================
FAIL: test_django_sum (my_app.tests.SumTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mark/projects/django-sum-bug.git/my_project/my_app/tests.py", line 55, in test_django_sum
    self.assertEqual(rows.aggregate(Sum('amount'))['amount__sum'], 30)
AssertionError: Decimal('40.00') != 30

----------------------------------------------------------------------
Ran 3 tests in 0.019s

FAILED (failures=1)
Destroying test database for alias 'default'...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages