本文整理汇总了Python中zodbbrowser.browser.ZodbInfoView.selectObjectToView方法的典型用法代码示例。如果您正苦于以下问题:Python ZodbInfoView.selectObjectToView方法的具体用法?Python ZodbInfoView.selectObjectToView怎么用?Python ZodbInfoView.selectObjectToView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zodbbrowser.browser.ZodbInfoView
的用法示例。
在下文中一共展示了ZodbInfoView.selectObjectToView方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testSelectObjectToView_by_oid_in_hex
# 需要导入模块: from zodbbrowser.browser import ZodbInfoView [as 别名]
# 或者: from zodbbrowser.browser.ZodbInfoView import selectObjectToView [as 别名]
def testSelectObjectToView_by_oid_in_hex(self):
oid = u64(self.root['stub']._p_oid)
hex_oid = hex(oid).rstrip('L')
view = ZodbInfoView(self.root, TestRequest(form={'oid': hex_oid}))
self.assertEquals(view.selectObjectToView(), self.root['stub'])
示例2: testSelectObjectToView_by_oid
# 需要导入模块: from zodbbrowser.browser import ZodbInfoView [as 别名]
# 或者: from zodbbrowser.browser.ZodbInfoView import selectObjectToView [as 别名]
def testSelectObjectToView_by_oid(self):
oid = u64(self.root['stub']._p_oid)
view = ZodbInfoView(self.root, TestRequest(form={'oid': str(oid)}))
self.assertEquals(view.selectObjectToView(), self.root['stub'])
示例3: testSelectObjectToView_find_parent
# 需要导入模块: from zodbbrowser.browser import ZodbInfoView [as 别名]
# 或者: from zodbbrowser.browser.ZodbInfoView import selectObjectToView [as 别名]
def testSelectObjectToView_find_parent(self):
view = ZodbInfoView(self.root['stub']['member'], TestRequest())
self.assertEquals(view.selectObjectToView(), self.root['stub'])
示例4: testSelectObjectToView_find_parent_fail_fall_back_to_root
# 需要导入模块: from zodbbrowser.browser import ZodbInfoView [as 别名]
# 或者: from zodbbrowser.browser.ZodbInfoView import selectObjectToView [as 别名]
def testSelectObjectToView_find_parent_fail_fall_back_to_root(self):
view = ZodbInfoView(self.root['stub']['member']['notpersistent'], TestRequest())
view.jar = self.root._p_jar
self.assertEquals(view.selectObjectToView(), self.root)
示例5: testSelectObjectToView_use_context
# 需要导入模块: from zodbbrowser.browser import ZodbInfoView [as 别名]
# 或者: from zodbbrowser.browser.ZodbInfoView import selectObjectToView [as 别名]
def testSelectObjectToView_use_context(self):
view = ZodbInfoView(self.root, TestRequest())
self.assertEquals(view.selectObjectToView(), self.root)
view = ZodbInfoView(self.root['root']['item'], TestRequest())
self.assertEquals(view.selectObjectToView(), self.root['root']['item'])