本文整理汇总了Python中OFS.Folder.Folder._delObject方法的典型用法代码示例。如果您正苦于以下问题:Python Folder._delObject方法的具体用法?Python Folder._delObject怎么用?Python Folder._delObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OFS.Folder.Folder
的用法示例。
在下文中一共展示了Folder._delObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testAllowGroupsAttribute
# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import _delObject [as 别名]
def testAllowGroupsAttribute(self):
# Verify that __allow_groups__ gets set and removed
from OFS.Folder import Folder
f = Folder()
zcuf = self._makeOne()
f._setObject(zcuf.getId(), zcuf)
self.assert_(zcuf.getId() in f.objectIds())
self.assert_(aq_base(f.__allow_groups__) is aq_base(f.acl_users))
f._delObject(zcuf.getId())
self.assert_(not zcuf.getId() in f.objectIds())
示例2: test_before_traverse_hooks
# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import _delObject [as 别名]
def test_before_traverse_hooks(self):
from OFS.Folder import Folder
container = Folder()
cc = self._makeOne()
marker = []
bt_before = getattr(container, '__before_traverse__', marker)
self.failUnless(bt_before is marker)
container._setObject(cc.id, cc)
bt_added = getattr(container, '__before_traverse__')
self.assertEqual(len(bt_added.items()), 1)
k, v = bt_added.items()[0]
self.failUnless(k[1].startswith(self._getTargetClass().meta_type))
self.assertEqual(v.name, cc.id)
container._delObject(cc.id)
bt_removed = getattr(container, '__before_traverse__')
self.assertEqual(len(bt_removed.items()), 0)
示例3: _delObject
# 需要导入模块: from OFS.Folder import Folder [as 别名]
# 或者: from OFS.Folder.Folder import _delObject [as 别名]
def _delObject(self, id, dp=1):
catalog = self._getOb(id)
Folder._delObject(self, id, dp)
self._unregisterMessageCatalog(catalog)