summaryrefslogtreecommitdiff
path: root/tests/db_functions/math/test_abs.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2019-03-15 00:42:01 +0100
committerTim Graham <timograham@gmail.com>2019-03-14 19:42:21 -0400
commitb150d9946013758a2a13eee751ac828d8582d944 (patch)
treecfe35cd257ac0fc64635c57e1c51f74e55085384 /tests/db_functions/math/test_abs.py
parenta9ce7e2bcd7493ea7bf3ec3f9828b20809ad9884 (diff)
[2.2.x] Simplified test_transform()s in db_functions.math.
Backport of 258110d6cdea5050f8df0bbc9af3fcd9bd342d29 from master.
Diffstat (limited to 'tests/db_functions/math/test_abs.py')
-rw-r--r--tests/db_functions/math/test_abs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/db_functions/math/test_abs.py b/tests/db_functions/math/test_abs.py
index b87f6844bc..a9e0175e84 100644
--- a/tests/db_functions/math/test_abs.py
+++ b/tests/db_functions/math/test_abs.py
@@ -49,5 +49,5 @@ class AbsTests(TestCase):
with register_lookup(DecimalField, Abs):
DecimalModel.objects.create(n1=Decimal('-1.5'), n2=Decimal('0'))
DecimalModel.objects.create(n1=Decimal('-0.5'), n2=Decimal('0'))
- objs = DecimalModel.objects.filter(n1__abs__gt=1)
- self.assertQuerysetEqual(objs, [Decimal('-1.5')], lambda a: a.n1)
+ obj = DecimalModel.objects.filter(n1__abs__gt=1).get()
+ self.assertEqual(obj.n1, Decimal('-1.5'))