1
0
mirror of https://github.com/django/django.git synced 2024-12-22 09:05:43 +00:00

Refs #31157 -- Added tests for display_for_field() with empty JSONField.

This commit is contained in:
dbxnr 2020-05-08 08:44:33 +02:00 committed by Mariusz Felisiak
parent 2e0f04507b
commit 675ce4dd35

View File

@ -176,6 +176,9 @@ class UtilsTests(SimpleTestCase):
display_value = display_for_field(None, models.FloatField(), self.empty_value)
self.assertEqual(display_value, self.empty_value)
display_value = display_for_field(None, models.JSONField(), self.empty_value)
self.assertEqual(display_value, self.empty_value)
def test_number_formats_display_for_field(self):
display_value = display_for_field(12345.6789, models.FloatField(), self.empty_value)
self.assertEqual(display_value, '12345.6789')