summaryrefslogtreecommitdiff
path: root/tests/db_functions/math/test_round.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/db_functions/math/test_round.py')
-rw-r--r--tests/db_functions/math/test_round.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/db_functions/math/test_round.py b/tests/db_functions/math/test_round.py
index d242f2de0f..4c2634c3c2 100644
--- a/tests/db_functions/math/test_round.py
+++ b/tests/db_functions/math/test_round.py
@@ -10,6 +10,11 @@ from ..models import DecimalModel, FloatModel, IntegerModel
class RoundTests(TestCase):
+ def test_null(self):
+ IntegerModel.objects.create()
+ obj = IntegerModel.objects.annotate(null_round=Round('normal')).first()
+ self.assertIsNone(obj.null_round)
+
def test_decimal(self):
DecimalModel.objects.create(n1=Decimal('-12.9'), n2=Decimal('0.6'))
obj = DecimalModel.objects.annotate(n1_round=Round('n1'), n2_round=Round('n2')).first()