[Zope-Checkins] SVN: Zope/branches/2.12/src/AccessControl/tests/testUser.py Add a unittest for today's fix.
Tres Seaver
tseaver at palladion.com
Mon Oct 24 22:29:41 UTC 2011
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),
+ ))
More information about the Zope-Checkins
mailing list