Code

Ticket #12005: EmailField_single_letter_domains.diff

File EmailField_single_letter_domains.diff, 896 bytes (added by djansoft, 4 years ago)
Line 
1Index: tests/regressiontests/forms/fields.py
2===================================================================
3--- tests/regressiontests/forms/fields.py       (revision 12394)
4+++ tests/regressiontests/forms/fields.py       (working copy)
5@@ -408,6 +408,8 @@
6         self.assertRaisesErrorWithMessage(ValidationError, "[u'Enter a valid e-mail address.']", f.clean, 'example@inv-.-alid.com')
7         self.assertEqual(u'example@valid-----hyphens.com', f.clean('example@valid-----hyphens.com'))
8         self.assertEqual(u'example@valid-with-hyphens.com', f.clean('example@valid-with-hyphens.com'))
9+        self.assertEqual(u'single-letter-domain-valid@a.com', f.clean('single-letter-domain-valid@a.com'))
10+        self.assertEqual(u'single-letter-subdomain-valid@a.bbb.com', f.clean('single-letter-subdomain-valid@a.bbb.com'))
11 
12     def test_email_regexp_for_performance(self):
13         f = EmailField()