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

Zachery Bir zbir at urbanape.com
Fri May 27 14:56:25 EDT 2005


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, 'new_user at example.com' )
 
+    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()



More information about the Zope-CVS mailing list