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

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-serv7730

Modified Files:
      Tag: zbir_fixing_ids_branch
	test_ZODBUserManager.py 
Log Message:
Test the new internal id mangling.


=== Products/PluggableAuthService/plugins/tests/test_ZODBUserManager.py 1.6 => 1.6.8.1 ===
--- 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:33:42 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.