コード例 #1
0
 def __init__(self):
     if hasattr(BaseTool, '__init__'):
         BaseTool.__init__(self)
     # build and persist an MD5 key
     self.md5key = ''
     for i in range(0, 20):
         self.md5key += chr(ord('a') + random.randint(0, 26))
コード例 #2
0
 def __init__(self):
     if hasattr(BaseTool, '__init__'):
         BaseTool.__init__(self)
     # build and persist an MD5 key
     self.md5key = ''
     for i in range(0, 20):
         self.md5key += chr(ord('a') + random.randint(0, 26))
コード例 #3
0
ファイル: test_ActionsTool.py プロジェクト: bendavis78/zope
 def test_listActionInformationActions(self):
     """
     Check that listFilteredActionsFor works for objects
     that return ActionInformation objects
     """
     root = self.root
     tool = self.tool
     root._setObject('portal_registration', RegistrationTool())
     self.tool.action_providers = ('portal_actions', )
     self.assertEqual(
         tool.listFilteredActionsFor(root.portal_registration), {
             'workflow': [],
             'user': [],
             'object': [],
             'folder': [{
                 'permissions': ('List folder contents', ),
                 'id': 'folderContents',
                 'url': 'http://foo/folder_contents',
                 'title': 'Folder contents',
                 'name': 'Folder contents',
                 'visible': True,
                 'available': True,
                 'allowed': True,
                 'category': 'folder'
             }],
             'global': []
         })
コード例 #4
0
    def _makeOne(self):
        from Products.CMFCore.RegistrationTool import RegistrationTool

        return RegistrationTool()