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

@ -14,9 +14,11 @@ class LogTests(TestCase):
obj = IntegerModel.objects.annotate(
null_log_small=Log('small', 'normal'),
null_log_normal=Log('normal', 'big'),
null_log_big=Log('big', 'normal'),
).first()
self.assertIsNone(obj.null_log_small)
self.assertIsNone(obj.null_log_normal)
self.assertIsNone(obj.null_log_big)
def test_decimal(self):
DecimalModel.objects.create(n1=Decimal('12.9'), n2=Decimal('3.6'))