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


Python ICheckinCheckoutPolicy.keys方法代码示例

本文整理汇总了Python中plone.app.iterate.interfaces.ICheckinCheckoutPolicy.keys方法的典型用法代码示例。如果您正苦于以下问题:Python ICheckinCheckoutPolicy.keys方法的具体用法?Python ICheckinCheckoutPolicy.keys怎么用?Python ICheckinCheckoutPolicy.keys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在plone.app.iterate.interfaces.ICheckinCheckoutPolicy的用法示例。


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

示例1: test_cancel_checkout

# 需要导入模块: from plone.app.iterate.interfaces import ICheckinCheckoutPolicy [as 别名]
# 或者: from plone.app.iterate.interfaces.ICheckinCheckoutPolicy import keys [as 别名]
 def test_cancel_checkout(self):
     self.setRoles(('Contributor',))
     p1 = self.places['1']
     self.failUnless('foo' in p1, p1.keys())
     wc = ICheckinCheckoutPolicy(p1).checkout(self.places)
     self.failUnlessEqual(len(wc.keys()), 0, wc.keys())
     p1 = ICheckinCheckoutPolicy(wc).cancelCheckout()
     self.failUnless('foo' in p1, p1.keys())
     # A child's history acquires its parent's history
     history = self.repo.getHistory(p1['foo'])
     self.failUnlessEqual(len(history), 1)
开发者ID:isawnyu,项目名称:pleiades-iterate,代码行数:13,代码来源:test_iterate.py

示例2: test_add_name_to_wc

# 需要导入模块: from plone.app.iterate.interfaces import ICheckinCheckoutPolicy [as 别名]
# 或者: from plone.app.iterate.interfaces.ICheckinCheckoutPolicy import keys [as 别名]
 def test_add_name_to_wc(self):
     self.setRoles(('Contributor',))
     p1 = self.places['1']
     self.failUnless('foo' in p1, p1.keys())
     wc = ICheckinCheckoutPolicy(p1).checkout(self.places)
     nid = wc.invokeFactory('Name', 'bar', nameTransliterated=u"Bar")
     self.failUnless('bar' in wc, wc.keys())
     p1 = ICheckinCheckoutPolicy(wc).checkin("updated")
     self.failUnless('foo' in p1, p1.keys())
     self.failUnless('bar' in p1, p1.keys())
     # A child's history acquires its parent's history
     history = self.repo.getHistory(p1['foo'])
     self.failUnlessEqual(len(history), 2)
     history = self.repo.getHistory(p1['bar'])
     self.failUnlessEqual(len(history), 1)
开发者ID:isawnyu,项目名称:pleiades-iterate,代码行数:17,代码来源:test_iterate.py

示例3: test_nothing

# 需要导入模块: from plone.app.iterate.interfaces import ICheckinCheckoutPolicy [as 别名]
# 或者: from plone.app.iterate.interfaces.ICheckinCheckoutPolicy import keys [as 别名]
 def test_nothing(self):
     self.setRoles(('Contributor',))
     p1 = self.places['1']
     self.failUnless('foo' in p1, p1.keys())
     wc = ICheckinCheckoutPolicy(p1).checkout(self.places)
     state = self.wf.getInfoFor(wc, 'review_state')
     self.failUnlessEqual(state, 'private')
     self.failUnlessEqual(len(wc.keys()), 0, wc.keys())
     # A child's history acquires its parent's history
     history = self.repo.getHistory(p1['foo'])
     self.failUnlessEqual(len(history), 1)
     p1 = ICheckinCheckoutPolicy(wc).checkin("updated")
     self.failUnless('foo' in p1, p1.keys())
     # A child's history acquires its parent's history
     history = self.repo.getHistory(p1['foo'])
     self.failUnlessEqual(len(history), 2)
开发者ID:isawnyu,项目名称:pleiades-iterate,代码行数:18,代码来源:test_iterate.py


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