def METHOD_NAME(self):
    # test adding invalid ip addresses
    form_data = {
        'whitelist': '.0.0.1, :dead:beef:::, 1.0.0.0/55',
        'blacklist': '  18.244.*  ,  999999:c0a8:101::42, 1.0.0.0/'
    }
    form = IPFilterForm(data=form_data)
    assert not form.is_valid()
    wmsg = "Invalid IP Address(es): ['.0.0.1', ':dead:beef:::', '1.0.0.0/55']"\
           " Please fix the error(s) and try again."
    assert wmsg == form._errors['whitelist'][0]  # pylint: disable=protected-access
    bmsg = "Invalid IP Address(es): ['18.244.*', '999999:c0a8:101::42', '1.0.0.0/']"\
           " Please fix the error(s) and try again."
    assert bmsg == form._errors['blacklist'][0]  # pylint: disable=protected-access
    with self.assertRaisesRegex(ValueError, "The IPFilter could not be created because the data didn't validate."):
        form.save()