(self)
| 50 | self.assertAlmostEqual(obj.big_sqrt, math.sqrt(obj.big)) |
| 51 | |
| 52 | def test_transform(self): |
| 53 | with register_lookup(DecimalField, Sqrt): |
| 54 | DecimalModel.objects.create(n1=Decimal("6.0"), n2=Decimal("0")) |
| 55 | DecimalModel.objects.create(n1=Decimal("1.0"), n2=Decimal("0")) |
| 56 | obj = DecimalModel.objects.filter(n1__sqrt__gt=2).get() |
| 57 | self.assertEqual(obj.n1, Decimal("6.0")) |
nothing calls this directly
no test coverage detected