mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Simplified test_transform()s in db_functions.math.
This commit is contained in:
committed by
Tim Graham
parent
a57c783dd4
commit
258110d6cd
@@ -49,5 +49,5 @@ class RoundTests(TestCase):
|
||||
with register_lookup(DecimalField, Round):
|
||||
DecimalModel.objects.create(n1=Decimal('2.0'), n2=Decimal('0'))
|
||||
DecimalModel.objects.create(n1=Decimal('-1.0'), n2=Decimal('0'))
|
||||
objs = DecimalModel.objects.filter(n1__round__gt=0)
|
||||
self.assertQuerysetEqual(objs, [Decimal('2.0')], lambda a: a.n1)
|
||||
obj = DecimalModel.objects.filter(n1__round__gt=0).get()
|
||||
self.assertEqual(obj.n1, Decimal('2.0'))
|
||||
|
||||
Reference in New Issue
Block a user