'Ensure that CharField.widget_attrs() always returns a dictionary.
Refs #15912'

def test_charfield_widget_attrs(self):

    f = CharField()
    self.assertEqual(f.widget_attrs(TextInput()), {})
    f = CharField(max_length=10)
    self.assertEqual(f.widget_attrs(HiddenInput()), {})
    self.assertEqual(f.widget_attrs(TextInput()), {u'maxlength': u'10'})
    self.assertEqual(f.widget_attrs(PasswordInput()), {u'maxlength': u'10'})
