'GenericIPAddressField with a specified protocol does not generate a
formfield without a protocol.'

def test_genericipaddressfield_formfield_protocol(self):

    model_field = models.GenericIPAddressField(protocol='IPv4')
    form_field = model_field.formfield()
    with self.assertRaises(ValidationError):
        form_field.clean('::1')
    model_field = models.GenericIPAddressField(protocol='IPv6')
    form_field = model_field.formfield()
    with self.assertRaises(ValidationError):
        form_field.clean('127.0.0.1')
