def test_invalid_emails(raw): """Returns None for unparseable emails.""" assert formats.normalize_email(raw) is None
def test_valid_emails(raw, output): """Returns valid phone numbers with domain part lower-cased.""" assert formats.normalize_email(raw) == output
def clean_email(self): return formats.normalize_email(self.cleaned_data["email"])