Ticket #12005: EmailField_single_letter_domains.diff

File EmailField_single_letter_domains.diff, 896 bytes (added by Daniel Gonzalez Gasull, 15 years ago)
  • tests/regressiontests/forms/fields.py

     
    408408        self.assertRaisesErrorWithMessage(ValidationError, "[u'Enter a valid e-mail address.']", f.clean, 'example@inv-.-alid.com')
    409409        self.assertEqual(u'example@valid-----hyphens.com', f.clean('example@valid-----hyphens.com'))
    410410        self.assertEqual(u'example@valid-with-hyphens.com', f.clean('example@valid-with-hyphens.com'))
     411        self.assertEqual(u'single-letter-domain-valid@a.com', f.clean('single-letter-domain-valid@a.com'))
     412        self.assertEqual(u'single-letter-subdomain-valid@a.bbb.com', f.clean('single-letter-subdomain-valid@a.bbb.com'))
    411413
    412414    def test_email_regexp_for_performance(self):
    413415        f = EmailField()
Back to Top