本文整理汇总了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)
示例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)
示例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())
示例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
示例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)
示例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)
示例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)
示例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 )
示例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)
示例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() )
示例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',)
示例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",)
示例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)
示例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',)
示例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',)