@any_field.register(models.CharField)<EOL>def any_char_field(field, **kwargs):
min_length = kwargs.get('<STR_LIT>', <NUM_LIT:1>)<EOL>max_length = kwargs.get('<STR_LIT:max_length>', field.max_length)<EOL>return xunit.any_string(min_length=min_length, max_length=max_length)<EOL>
Return random value for CharField

>>> result = any_field(models.CharField(max_length=10))
>>> type(result)
<type 'str'>