mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +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 SqrtTests(TestCase):
|
|||
with register_lookup(DecimalField, Sqrt):
|
||||
DecimalModel.objects.create(n1=Decimal('6.0'), n2=Decimal('0'))
|
||||
DecimalModel.objects.create(n1=Decimal('1.0'), n2=Decimal('0'))
|
||||
objs = DecimalModel.objects.filter(n1__sqrt__gt=2)
|
||||
self.assertQuerysetEqual(objs, [Decimal('6.0')], lambda a: a.n1)
|
||||
obj = DecimalModel.objects.filter(n1__sqrt__gt=2).get()
|
||||
self.assertEqual(obj.n1, Decimal('6.0'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue