def test_django_validator_invalid(self): from django.core.validators import validate_email validator = valid.django_validator(valid.string, validate_email) self.expect_raises(validator, 'mesomewhere.com', errors=['Enter a valid e-mail address.'] )
def test_django_validator(self): from django.core.validators import validate_email validator = valid.django_validator(valid.string, validate_email) self.expect(validator, '*****@*****.**')