1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #33355 -- Added missing tests for database functions and expression on null values.

This commit is contained in:
Adam Johnson
2021-12-10 09:13:09 +00:00
committed by Mariusz Felisiak
parent 78f062f63e
commit a8fa3e5cd7
7 changed files with 22 additions and 0 deletions

View File

@@ -13,9 +13,11 @@ class PowerTests(TestCase):
obj = IntegerModel.objects.annotate(
null_power_small=Power('small', 'normal'),
null_power_normal=Power('normal', 'big'),
null_power_big=Power('big', 'normal'),
).first()
self.assertIsNone(obj.null_power_small)
self.assertIsNone(obj.null_power_normal)
self.assertIsNone(obj.null_power_big)
def test_decimal(self):
DecimalModel.objects.create(n1=Decimal('1.0'), n2=Decimal('-0.6'))