@any_form_field.register(forms.IPAddressField)<EOL>def ipaddress_field_data(field, **kwargs):
choices = kwargs.get('<STR_LIT>')<EOL>if choices:<EOL><INDENT>return random.choice(choices)<EOL><DEDENT>else:<EOL><INDENT>nums = [str(xunit.any_int(min_value=<NUM_LIT:0>, max_value=<NUM_LIT:255>)) for _ in xrange(<NUM_LIT:0>, <NUM_LIT:4>)]<EOL>return "<STR_LIT:.>".join(nums)<EOL><DEDENT>
Return random value for IPAddressField

>>> result = any_form_field(forms.IPAddressField())
>>> type(result)
<type 'str'>
>>> from django.core.validators import ipv4_re
>>> import re
>>> re.match(ipv4_re, result) is not None
True