Log message for revision 123151:
  Add a unittest for today's fix.

Changed:
  U   Zope/branches/2.12/src/AccessControl/tests/testUser.py

-=-
Modified: Zope/branches/2.12/src/AccessControl/tests/testUser.py
===================================================================
--- Zope/branches/2.12/src/AccessControl/tests/testUser.py      2011-10-24 
22:23:09 UTC (rev 123150)
+++ Zope/branches/2.12/src/AccessControl/tests/testUser.py      2011-10-24 
22:29:40 UTC (rev 123151)
@@ -227,7 +227,15 @@
 # TODO class Test_readUserAccessFile(unittest.TestCase)
 
 
-# TODO class BasicUserFoldertests(unittest.TestCase)
+class BasicUserFolderTests(unittest.TestCase):
+ 
+    def _getTargetClass(self):
+        from AccessControl.User import BasicUserFolder
+        return BasicUserFolder
+ 
+    def test_manage_users_security_initialized(self):
+        uf = self._getTargetClass()()
+        self.assertTrue(hasattr(uf, 'manage_users__roles__'))
 
 
 class UserFolderTests(unittest.TestCase):
@@ -494,11 +502,12 @@
 
 
 def test_suite():
-    suite = unittest.TestSuite()
-    suite.addTest(unittest.makeSuite(BasicUserTests))
-    suite.addTest(unittest.makeSuite(SimpleUserTests))
-    suite.addTest(unittest.makeSuite(SpecialUserTests))
-    suite.addTest(unittest.makeSuite(UnrestrictedUserTests))
-    suite.addTest(unittest.makeSuite(NullUnrestrictedUserTests))
-    suite.addTest(unittest.makeSuite(UserFolderTests))
-    return suite
+    return unittest.TestSuite((
+        unittest.makeSuite(BasicUserTests),
+        unittest.makeSuite(SimpleUserTests),
+        unittest.makeSuite(SpecialUserTests),
+        unittest.makeSuite(UnrestrictedUserTests),
+        unittest.makeSuite(NullUnrestrictedUserTests),
+        unittest.makeSuite(BasicUserFolderTests),
+        unittest.makeSuite(UserFolderTests),
+    ))

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to