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
@@ -50,5 +50,5 @@ class DegreesTests(TestCase):
|
||||
with register_lookup(DecimalField, Degrees):
|
||||
DecimalModel.objects.create(n1=Decimal('5.4'), n2=Decimal('0'))
|
||||
DecimalModel.objects.create(n1=Decimal('-30'), n2=Decimal('0'))
|
||||
objs = DecimalModel.objects.filter(n1__degrees__gt=0)
|
||||
self.assertQuerysetEqual(objs, [Decimal('5.4')], lambda a: a.n1)
|
||||
obj = DecimalModel.objects.filter(n1__degrees__gt=0).get()
|
||||
self.assertEqual(obj.n1, Decimal('5.4'))
|
||||
|
||||
Reference in New Issue
Block a user