'CharField passes its max_length attribute to form fields created using
the formfield() method.'

def test_max_length_passed_to_formfield(self):

    cf1 = models.CharField()
    cf2 = models.CharField(max_length=1234)
    self.assertIsNone(cf1.formfield().max_length)
    self.assertEqual(1234, cf2.formfield().max_length)
