Skip to content

Commit d506735

Browse files
author
Adam Robbins-Pianka
committed
These are not invalid email addresses
The domain part of the email address does not have to have a dot in it; even if it did, the last domain specified cannot be assured to be a TLD.
1 parent 08c733e commit d506735

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiita_db/test/test_user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_validate_email(self):
4343
valid3 = 'w00t@123.456.789.com'
4444
invalid1 = '@stuff.com'
4545
invalid2 = 'asdasdásd@things.com'
46-
invalid3 = 'asdas@com'
46+
invalid3 = '.asdas@com'
4747

4848
self.assertTrue(validate_email(valid1))
4949
self.assertTrue(validate_email(valid2))
@@ -182,7 +182,7 @@ def test_exists_notindb(self):
182182

183183
def test_exists_invaid_email(self):
184184
with self.assertRaises(IncorrectEmailError):
185-
User.exists("notanemail@badformat")
185+
User.exists("notanemail.@badformat")
186186

187187
def test_get_email(self):
188188
self.assertEqual(self.user.email, 'admin@foo.bar')

0 commit comments

Comments
 (0)