CVS: Products/PluggableAuthService/plugins/tests - test_ZODBUserManager.py:1.7

Zachery Bir <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
Update of /cvs-repository/Products/PluggableAuthService/plugins/tests
In directory cvs.zope.org:/tmp/cvs-serv14876/plugins/tests

Modified Files:
	test_ZODBUserManager.py 
Log Message:
merging zbir_fixing_ids_branch to the head


=== Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py 1.6 => 1.7 ===
--- Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py:1.6	Sat Oct 16 16:15:46 2004
+++ Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py	Fri May 27 14:55:45 2005
@@ -357,6 +357,31 @@
         self.assertEqual( user_id, 'new_user' )
         self.assertEqual( login, '[email protected]' )
 
+    def test_enumerateUsersWithOptionalMangling(self):
+
+        zum = self._makeOne()
+        zum.prefix = 'special__'
+
+        zum.addUser('user', 'login', 'password')
+        info = zum.enumerateUsers(login='login')
+        self.assertEqual(info[0]['id'], 'special__user')
+
+    def test_getUserByIdWithOptionalMangling(self):
+
+        zum = self._makeOne()
+        zum.prefix = 'special__'
+
+        zum.addUser('user', 'login', 'password')
+
+        info = zum.enumerateUsers(id='user', exact_match=True)
+        self.assertEqual(len(info), 0)
+
+        info = zum.enumerateUsers(id='special__user', exact_match=True)
+        self.assertEqual(info[0]['id'], 'special__user')
+
+        info = zum.enumerateUsers(id='special__luser', exact_match=True)
+        self.assertEqual(len(info), 0)
+
 
 if __name__ == "__main__":
     unittest.main()

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.