|
8 | 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 | 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10 | 10 | # |
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 $ |
12 | 12 |
|
13 | 13 | import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822 |
14 | 14 |
|
@@ -957,6 +957,12 @@ def testUserLookup(self): |
957 | 957 | self. assertEqual( uidFromAddress( self. db, ( '', '[email protected]'), 0), i) |
958 | 958 | self. assertEqual( uidFromAddress( self. db, ( '', '[email protected]'), 0), i) |
959 | 959 |
|
| 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 | + |
960 | 966 | def testUserCreate(self): |
961 | 967 | i = uidFromAddress( self. db, ( '', '[email protected]'), 1) |
962 | 968 | self. assertNotEqual( uidFromAddress( self. db, ( '', '[email protected]'), 1), i) |
@@ -991,6 +997,7 @@ def testRegistrationConfirmation(self): |
991 | 997 | def suite(): |
992 | 998 | l = [unittest.makeSuite(MailgwTestCase), |
993 | 999 | ] |
| 1000 | + l = [MailgwTestCase("testUserAlternateLookup")] |
994 | 1001 | return unittest.TestSuite(l) |
995 | 1002 |
|
996 | 1003 |
|
|
0 commit comments