mirror of
https://github.com/django/django.git
synced 2025-09-08 03:30:48 +00:00
Simplified test_transform()s in db_functions.math.
This commit is contained in:
parent
a57c783dd4
commit
258110d6cd
16 changed files with 32 additions and 32 deletions
|
@ -50,5 +50,5 @@ class CotTests(TestCase):
|
|||
with register_lookup(DecimalField, Cot):
|
||||
DecimalModel.objects.create(n1=Decimal('12.0'), n2=Decimal('0'))
|
||||
DecimalModel.objects.create(n1=Decimal('1.0'), n2=Decimal('0'))
|
||||
objs = DecimalModel.objects.filter(n1__cot__gt=0)
|
||||
self.assertQuerysetEqual(objs, [Decimal('1.0')], lambda a: a.n1)
|
||||
obj = DecimalModel.objects.filter(n1__cot__gt=0).get()
|
||||
self.assertEqual(obj.n1, Decimal('1.0'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue