From 6d4efa8e6a4cc7be4ba957dec71f6f63cd58700d Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Wed, 19 Dec 2018 23:04:25 +0000 Subject: Refs #28643 -- Changed Variance() to use NumericOutputFieldMixin. Keeps precision instead of forcing DecimalField to FloatField. --- tests/aggregation_regress/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/aggregation_regress/tests.py b/tests/aggregation_regress/tests.py index d72e75ce32..274dc29d6d 100644 --- a/tests/aggregation_regress/tests.py +++ b/tests/aggregation_regress/tests.py @@ -1160,7 +1160,7 @@ class AggregationTests(TestCase): self.assertEqual( Book.objects.aggregate(Variance('price')), - {'price__variance': Approximate(583.77, 1)} + {'price__variance': Approximate(Decimal('583.77'), 1)} ) self.assertEqual( @@ -1175,7 +1175,7 @@ class AggregationTests(TestCase): self.assertEqual( Book.objects.aggregate(Variance('price', sample=True)), - {'price__variance': Approximate(700.53, 2)} + {'price__variance': Approximate(Decimal('700.53'), 2)} ) def test_filtering_by_annotation_name(self): -- cgit v1.3