(self)
| 46 | self.assertAlmostEqual(obj.big_cos, math.cos(obj.big)) |
| 47 | |
| 48 | def test_transform(self): |
| 49 | with register_lookup(DecimalField, Cos): |
| 50 | DecimalModel.objects.create(n1=Decimal("-8.0"), n2=Decimal("0")) |
| 51 | DecimalModel.objects.create(n1=Decimal("3.14"), n2=Decimal("0")) |
| 52 | obj = DecimalModel.objects.filter(n1__cos__gt=-0.2).get() |
| 53 | self.assertEqual(obj.n1, Decimal("-8.0")) |
nothing calls this directly
no test coverage detected