Skip to content

Commit ac45fe0

Browse files
author
Johannes Gijsbers
committed
Add a test for looking up alternate adresses and case-insensitivity.
1 parent f1b22e9 commit ac45fe0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/test_mailgw.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# but WITHOUT ANY WARRANTY; without even the implied warranty of
99
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010
#
11-
# $Id: test_mailgw.py,v 1.51 2003-09-07 20:37:33 jlgijsbers Exp $
11+
# $Id: test_mailgw.py,v 1.52 2003-09-15 19:35:53 jlgijsbers Exp $
1212

1313
import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822
1414

@@ -957,6 +957,12 @@ def testUserLookup(self):
957957
self.assertEqual(uidFromAddress(self.db, ('', '[email protected]'), 0), i)
958958
self.assertEqual(uidFromAddress(self.db, ('', '[email protected]'), 0), i)
959959

960+
def testUserAlternateLookup(self):
961+
i = self.db.user.create(username='user1', address='[email protected]',
962+
alternate_addresses='[email protected]')
963+
self.assertEqual(uidFromAddress(self.db, ('', '[email protected]'), 0), i)
964+
self.assertEqual(uidFromAddress(self.db, ('', '[email protected]'), 0), i)
965+
960966
def testUserCreate(self):
961967
i = uidFromAddress(self.db, ('', '[email protected]'), 1)
962968
self.assertNotEqual(uidFromAddress(self.db, ('', '[email protected]'), 1), i)
@@ -991,6 +997,7 @@ def testRegistrationConfirmation(self):
991997
def suite():
992998
l = [unittest.makeSuite(MailgwTestCase),
993999
]
1000+
l = [MailgwTestCase("testUserAlternateLookup")]
9941001
return unittest.TestSuite(l)
9951002

9961003

0 commit comments

Comments
 (0)