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


Python TransactionalTest.setUp方法代码示例

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


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

示例1: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
 def setUp(self):
     TransactionalTest.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)
开发者ID:goschtl,项目名称:zope,代码行数:9,代码来源:test_join.py

示例2: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
    def setUp(self):
        TransactionalTest.setUp(self)

        root = self.root
        root._setObject('portal', DummyContent('portal', 'url_portal'))
        portal = self.portal = root.portal
        portal.portal_membership = DummyMembershipTool()
        self.folder = DummyContent('foo', 'url_foo')
        self.object = DummyContent('bar', 'url_bar')
开发者ID:c0ns0le,项目名称:zenoss-4,代码行数:11,代码来源:test_ActionInformation.py

示例3: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
    def setUp(self):
        import Products.DCWorkflow

        TransactionalTest.setUp(self)
        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)
开发者ID:goschtl,项目名称:zope,代码行数:12,代码来源:test_join.py

示例4: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
    def setUp(self):
        from Products.CMFCore.interfaces import IMembershipTool

        TransactionalTest.setUp(self)
        self.site = DummySite('site').__of__(self.app)
        make_objectmanager_site(self.site)
        setSite(self.site)
        self.site._setObject('portal_membership', self._makeOne())
        sm = getSiteManager()
        sm.registerUtility(self.site.portal_membership, IMembershipTool)
开发者ID:zopefoundation,项目名称:Products.CMFDefault,代码行数:12,代码来源:test_MembershipTool.py

示例5: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
    def setUp(self):
        TransactionalTest.setUp(self)

        root = self.root
        root._setObject('portal', DummyContent('portal', 'url_portal'))
        portal = self.portal = root.portal
        sm = getSiteManager(portal)
        portal.portal_membership = DummyMembershipTool()
        sm.registerUtility(portal.portal_membership, IMembershipTool)
        self.folder = DummyContent('foo', 'url_foo')
        self.object = DummyContent('bar', 'url_bar')
开发者ID:goschtl,项目名称:zope,代码行数:13,代码来源:test_ActionInformation.py

示例6: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
    def setUp(self):
        import Products.CMFCore
        TransactionalTest.setUp(self)
        setUpTraversing()
        zcml.load_config('permissions.zcml', Products.Five)
        zcml.load_config('configure.zcml', Products.CMFCore)

        root = self.root
        root._setObject('portal', DummyContent('portal', 'url_portal'))
        portal = self.portal = root.portal
        portal.portal_membership = DummyMembershipTool()
        self.folder = DummyContent('foo', 'url_foo')
        self.object = DummyContent('bar', 'url_bar')
开发者ID:goschtl,项目名称:zope,代码行数:15,代码来源:test_ActionInformation.py

示例7: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
    def setUp(self):
        import Products.CMFCore
        PlacelessSetup.setUp(self)
        TransactionalTest.setUp(self)
        zcml.load_config('meta.zcml', Products.Five)
        zcml.load_config('permissions.zcml', Products.Five)
        zcml.load_config('configure.zcml', Products.CMFCore)
        zcml.load_string(_TRAVERSE_ZCML)

        root = self.root
        root._setObject('portal', DummyContent('portal', 'url_portal'))
        portal = self.portal = root.portal
        portal.portal_membership = DummyMembershipTool()
        self.folder = DummyContent('foo', 'url_foo')
        self.object = DummyContent('bar', 'url_bar')
开发者ID:goschtl,项目名称:zope,代码行数:17,代码来源:test_ActionInformation.py

示例8: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
 def setUp(self):
     TransactionalTest.setUp(self)
     FSDVTest.setUp(self)
开发者ID:goschtl,项目名称:zope,代码行数:5,代码来源:test_FSImage.py

示例9: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
 def setUp(self):
     TransactionalTest.setUp(self)
     FSPTMaker.setUp(self)
开发者ID:goschtl,项目名称:zope,代码行数:5,代码来源:test_FSPageTemplate.py

示例10: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
 def setUp(self):
     TransactionalTest.setUp(self)
     FSDTMLMaker.setUp(self)
     setHooks()
开发者ID:goschtl,项目名称:zope,代码行数:6,代码来源:test_FSDTMLMethod.py

示例11: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
 def setUp(self):
     _TemplateSwitcher.setUp(self)
     TransactionalTest.setUp(self)
     FSSTXMaker.setUp(self)
开发者ID:goschtl,项目名称:zope,代码行数:6,代码来源:test_FSSTXMethod.py

示例12: setUp

# 需要导入模块: from Products.CMFCore.tests.base.testcase import TransactionalTest [as 别名]
# 或者: from Products.CMFCore.tests.base.testcase.TransactionalTest import setUp [as 别名]
 def setUp(self):
     TransactionalTest.setUp(self)
     self.site = DummySite('site').__of__(self.app)
开发者ID:goschtl,项目名称:zope,代码行数:5,代码来源:test_Document.py


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