diff options
author | Nick Pope <nick.pope@flightdataservices.com> | 2018-12-19 23:04:25 +0000 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2019-01-14 14:39:46 -0500 |
commit | 6d4efa8e6a4cc7be4ba957dec71f6f63cd58700d (patch) | |
tree | 79cffc18bd5d4d81a420145177dea5732fbc8ec7 /tests/aggregation_regress | |
parent | e85afa5943695457c85e9bc1c5dc0d985004e303 (diff) | |
download | django-6d4efa8e6a4cc7be4ba957dec71f6f63cd58700d.tar.gz |
Refs #28643 -- Changed Variance() to use NumericOutputFieldMixin.
Keeps precision instead of forcing DecimalField to FloatField.
Diffstat (limited to 'tests/aggregation_regress')
-rw-r--r-- | tests/aggregation_regress/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
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): |