diff --git a/tests/aggregation_regress/tests.py b/tests/aggregation_regress/tests.py
index 59a40c7..cfa8b1a 100644
a
|
b
|
class AggregationTests(TestCase):
|
107 | 107 | for attr, value in six.iteritems(kwargs): |
108 | 108 | self.assertEqual(getattr(obj, attr), value) |
109 | 109 | |
| 110 | def test_annotation_with_value(self): |
| 111 | values = ( |
| 112 | Book.objects |
| 113 | .filter(name='Practical Django Projects') |
| 114 | .annotate(discount_price=F('price') * 0.75) |
| 115 | .values('discount_price') |
| 116 | .annotate(sum_discount=Sum('discount_price')) |
| 117 | ) |
| 118 | self.assertEqual( |
| 119 | values, |
| 120 | {'discount_price': Decimal('22.2675'), 'sum_discount': Decimal('22.2675')}, |
| 121 | ) |
| 122 | |
110 | 123 | def test_aggregates_in_where_clause(self): |
111 | 124 | """ |
112 | 125 | Regression test for #12822: DatabaseError: aggregates not allowed in |