本文整理汇总了Python中Products.CMFCore.ActionInformation.ActionInformation.getActionExpression方法的典型用法代码示例。如果您正苦于以下问题:Python ActionInformation.getActionExpression方法的具体用法?Python ActionInformation.getActionExpression怎么用?Python ActionInformation.getActionExpression使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products.CMFCore.ActionInformation.ActionInformation
的用法示例。
在下文中一共展示了ActionInformation.getActionExpression方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_basic_construction
# 需要导入模块: from Products.CMFCore.ActionInformation import ActionInformation [as 别名]
# 或者: from Products.CMFCore.ActionInformation.ActionInformation import getActionExpression [as 别名]
def test_basic_construction(self):
ai = ActionInformation(id='view'
)
self.assertEqual(ai.getId(), 'view')
self.assertEqual(ai.Title(), 'view')
self.assertEqual(ai.Description(), '')
self.assertEqual(ai.getCondition(), '')
self.assertEqual(ai.getActionExpression(), '')
self.assertEqual(ai.getVisibility(), 1)
self.assertEqual(ai.getCategory(), 'object')
self.assertEqual(ai.getPermissions(), ())
示例2: test_editing
# 需要导入模块: from Products.CMFCore.ActionInformation import ActionInformation [as 别名]
# 或者: from Products.CMFCore.ActionInformation.ActionInformation import getActionExpression [as 别名]
def test_editing(self):
ai = ActionInformation(id='view',
category='folder',
)
ai.edit(id='new_id', title='blah')
self.assertEqual(ai.getId(), 'new_id')
self.assertEqual(ai.Title(), 'blah')
self.assertEqual(ai.Description(), '')
self.assertEqual(ai.getCondition(), '')
self.assertEqual(ai.getActionExpression(), '')
self.assertEqual(ai.getVisibility(), 1)
self.assertEqual(ai.getCategory(), 'folder')
self.assertEqual(ai.getPermissions(), ())
示例3: test_construction_with_Expressions
# 需要导入模块: from Products.CMFCore.ActionInformation import ActionInformation [as 别名]
# 或者: from Products.CMFCore.ActionInformation.ActionInformation import getActionExpression [as 别名]
def test_construction_with_Expressions(self):
ai = ActionInformation(id='view'
, title='View'
, action=Expression(
text='view')
, condition=Expression(
text='member')
, category='global'
, visible=0)
self.assertEqual(ai.getId(), 'view')
self.assertEqual(ai.Title(), 'View')
self.assertEqual(ai.Description(), '')
self.assertEqual(ai.getCondition(), 'member')
self.assertEqual(ai.getActionExpression(), 'string:view')
self.assertEqual(ai.getVisibility(), 0)
self.assertEqual(ai.getCategory(), 'global')
self.assertEqual(ai.getPermissions(), ())