'Regression test for #12550: display_for_field should handle None
value.'

def test_null_display_for_field(self):

    display_value = display_for_field(None, models.CharField(), self.empty_value)
    self.assertEqual(display_value, self.empty_value)
    display_value = display_for_field(None, models.CharField(choices=((None, 'test_none'),)), self.empty_value)
    self.assertEqual(display_value, 'test_none')
    display_value = display_for_field(None, models.DateField(), self.empty_value)
    self.assertEqual(display_value, self.empty_value)
    display_value = display_for_field(None, models.TimeField(), self.empty_value)
    self.assertEqual(display_value, self.empty_value)
    display_value = display_for_field(None, models.NullBooleanField(), self.empty_value)
    expected = ('<img    src="%sadmin/img/icon-unknown.svg"    alt="None"    />' % settings.STATIC_URL)
    self.assertHTMLEqual(display_value, expected)
    display_value = display_for_field(None, models.DecimalField(), self.empty_value)
    self.assertEqual(display_value, self.empty_value)
    display_value = display_for_field(None, models.FloatField(), self.empty_value)
    self.assertEqual(display_value, self.empty_value)
