当前位置: 首页>>代码示例>>Python>>正文


Python testcase.SecurityRequestTest类代码示例

本文整理汇总了Python中Products.CMFCore.tests.base.testcase.SecurityRequestTest的典型用法代码示例。如果您正苦于以下问题:Python SecurityRequestTest类的具体用法?Python SecurityRequestTest怎么用?Python SecurityRequestTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SecurityRequestTest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

    def setUp(self):
        import Products

        SecurityRequestTest.setUp(self)
        zcml.load_config('meta.zcml', Products.Five)
        zcml.load_config('permissions.zcml', Products.Five)
        zcml.load_config('content.zcml', Products.CMFCore)
开发者ID:goschtl,项目名称:zope,代码行数:7,代码来源:test_PortalFolder.py

示例2: setUp

 def setUp(self):
     SecurityRequestTest.setUp(self)
     setUpTraversing()
     zcml.load_config('permissions.zcml', Products.Five)
     zcml.load_config('configure.zcml', Products.GenericSetup)
     zcml.load_config('configure.zcml', Products.CMFCore)
     zcml.load_config('configure.zcml', Products.DCWorkflow)
开发者ID:goschtl,项目名称:zope,代码行数:7,代码来源:test_Portal.py

示例3: setUp

    def setUp(self):
        SecurityRequestTest.setUp(self)
        setUpEvents()

        self.root._setObject('site', DummySite('site'))
        self.site = self.root.site
        self.acl_users = self.site._setObject('acl_users', DummyUserFolder())
开发者ID:goschtl,项目名称:zope,代码行数:7,代码来源:test_PortalContent.py

示例4: setUp

    def setUp(self):
        import Products.DCWorkflow

        SecurityRequestTest.setUp(self)
        setUpEvents()
        setUpTraversing()
        setUpGenericSetup()
        zcml.load_config('permissions.zcml', Products.Five)
        zcml.load_config('configure.zcml', Products.Five.browser)
        zcml.load_config('configure.zcml', Products.CMFCore)
        zcml.load_config('configure.zcml', Products.CMFDefault)
        zcml.load_config('configure.zcml', Products.DCWorkflow)
        try:
            factory = self.root.manage_addProduct['CMFDefault'].addConfiguredSite
            factory('cmf', 'Products.CMFDefault:default', snapshot=False)
            self.site = self.root.cmf
            newSecurityManager(None, OmnipotentUser().__of__(self.site))
            self.site.invokeFactory('File', id='file')
            self.site.portal_workflow.doActionFor(self.site.file, 'publish')
            self.site.invokeFactory('Image', id='image')
            self.site.portal_workflow.doActionFor(self.site.image, 'publish')
            self.site.invokeFactory('Folder', id='subfolder')
            self.subfolder = self.site.subfolder
            self.workflow = self.site.portal_workflow
            transaction.savepoint(optimistic=True) # Make sure we have _p_jars
        except:
            self.tearDown()
            raise
开发者ID:goschtl,项目名称:zope,代码行数:28,代码来源:test_Image.py

示例5: setUp

 def setUp( self ):
     PlacelessSetup.setUp(self)
     SecurityRequestTest.setUp( self )
     self._trap_warning_output()
     zcml.load_config('meta.zcml', Products.Five)
     zcml.load_config('configure.zcml', Products.GenericSetup)
     zcml.load_config('configure.zcml', Products.CMFCore)
开发者ID:goschtl,项目名称:zope,代码行数:7,代码来源:test_Portal.py

示例6: setUp

 def setUp(self):
     PlacelessSetup.setUp(self)
     SecurityRequestTest.setUp(self)
     zcml.load_config('meta.zcml', Products.Five)
     zcml.load_config('permissions.zcml', Products.Five)
     zcml.load_config('configure.zcml', Products.GenericSetup)
     zcml.load_config('configure.zcml', Products.CMFCore)
     zcml.load_config('configure.zcml', Products.DCWorkflow)
开发者ID:goschtl,项目名称:zope,代码行数:8,代码来源:test_Portal.py

示例7: setUp

 def setUp(self):
     SecurityRequestTest.setUp(self)
     zcml.load_config('meta.zcml', Products.Five)
     zcml.load_config('permissions.zcml', Products.Five)
     zcml.load_config('configure.zcml', Products.GenericSetup)
     zcml.load_config('configure.zcml', Products.CMFCore)
     zcml.load_config('configure.zcml', Products.DCWorkflow)
     zcml.load_string(_TRAVERSE_ZCML)
开发者ID:goschtl,项目名称:zope,代码行数:8,代码来源:test_Portal.py

示例8: setUp

    def setUp( self ):
        SecurityRequestTest.setUp(self)
        root = self.root
        root.addDummy = addDummy

        root._setObject( 'portal_types', TypesTool() )
        tool = root.portal_types
        tool._setObject( 'Dummy', DummyFTI ) 
开发者ID:goschtl,项目名称:zope,代码行数:8,代码来源:test_TypesTool.py

示例9: setUp

 def setUp( self ):
     SecurityRequestTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     sm = getSiteManager()
     utool = self.site._setObject( 'portal_url', DummyTool() )
     sm.registerUtility(self.site.portal_url, IURLTool)
     mtool = self.site._setObject( 'portal_membership', DummyTool() )
     sm.registerUtility(self.site.portal_membership, IMembershipTool)
开发者ID:goschtl,项目名称:zope,代码行数:8,代码来源:test_ActionProviderBase.py

示例10: setUp

 def setUp(self):
     SecurityRequestTest.setUp(self)
     self.site = DummySite('site').__of__(self.root)
     self.site._setObject( 'portal_membership', DummyTool() )
     self.site._setObject( 'portal_types', TypesTool() )
     self.site._setObject( 'portal_url', DummyTool() )
     fti = FTIDATA_CMF15[0].copy()
     self.site.portal_types._setObject( 'Dummy Content 15', FTI(**fti) )
     self.site._setObject( 'foo', DummyContent() )
开发者ID:goschtl,项目名称:zope,代码行数:9,代码来源:test_DynamicType.py

示例11: setUp

    def setUp(self):
        SecurityRequestTest.setUp(self)

        root = self.root
        root._setObject( 'portal_actions', self._makeOne() )
        root._setObject( 'portal_url', URLTool() )
        root._setObject( 'foo', URLTool() )
        root._setObject('portal_membership', MembershipTool())
        self.tool = root.portal_actions
        self.tool.action_providers = ('portal_actions',)
开发者ID:goschtl,项目名称:zope,代码行数:10,代码来源:test_ActionsTool.py

示例12: setUp

    def setUp(self):
        SecurityRequestTest.setUp(self)

        root = self.root
        root._setObject("portal_actions", self._makeOne())
        root._setObject("portal_url", URLTool())
        root._setObject("foo", URLTool())
        root._setObject("portal_membership", MembershipTool())
        root._setObject("portal_types", TypesTool())
        self.tool = root.portal_actions
        self.tool.action_providers = ("portal_actions",)
开发者ID:wpjunior,项目名称:proled,代码行数:11,代码来源:test_ActionsTool.py

示例13: setUp

    def setUp(self):
        import Products.DCWorkflow

        SecurityRequestTest.setUp(self)
        setUpEvents()
        setUpTraversing()
        setUpGenericSetup()
        zcml.load_config('permissions.zcml', Products.Five)
        zcml.load_config('configure.zcml', Products.Five.browser)
        zcml.load_config('configure.zcml', Products.CMFCore)
        zcml.load_config('configure.zcml', Products.CMFDefault)
        zcml.load_config('configure.zcml', Products.DCWorkflow)
开发者ID:goschtl,项目名称:zope,代码行数:12,代码来源:test_Portal.py

示例14: setUp

 def setUp( self ):
     
     SecurityRequestTest.setUp(self)
     
     root = self.root
     root._setObject( 'portal_actions', ActionsTool() )
     root._setObject('foo', URLTool() )
     root._setObject('portal_membership', MembershipTool())
     root._setObject('portal_types', TypesTool())
     self.tool = root.portal_actions
     self.ut = root.foo
     self.tool.action_providers = ('portal_actions',)
开发者ID:goschtl,项目名称:zope,代码行数:12,代码来源:test_ActionsTool.py

示例15: setUp

    def setUp(self):
        SecurityRequestTest.setUp(self)

        root = self.root
        sm = getSiteManager()
        sm.registerUtility(root, ISiteRoot)
        root._setObject( 'portal_actions', self._makeOne() )
        root._setObject( 'portal_url', URLTool() )
        root._setObject( 'foo', URLTool() )
        root._setObject('portal_membership', MembershipTool())
        self.tool = root.portal_actions
        self.tool.action_providers = ('portal_actions',)
开发者ID:Vinsurya,项目名称:Plone,代码行数:12,代码来源:test_ActionsTool.py


注:本文中的Products.CMFCore.tests.base.testcase.SecurityRequestTest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。