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


Python testing.BodyAdapterTestCase类代码示例

本文整理汇总了Python中Products.GenericSetup.testing.BodyAdapterTestCase的典型用法代码示例。如果您正苦于以下问题:Python BodyAdapterTestCase类的具体用法?Python BodyAdapterTestCase怎么用?Python BodyAdapterTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setUp

    def setUp(self):
        from Products.CMFCore.ActionsTool import ActionsTool

        BodyAdapterTestCase.setUp(self)
        site = DummySite('site')
        site._setObject('portal_actions', ActionsTool('portal_actions'))
        self._obj = site.portal_actions
        self._BODY = _ACTIONSTOOL_BODY
开发者ID:goschtl,项目名称:zope,代码行数:8,代码来源:test_actions.py

示例2: setUp

    def setUp(self):
        from Products.CMFCore import DirectoryView
        from Products.CMFCore.SkinsTool import SkinsTool

        BodyAdapterTestCase.setUp(self)
        _DVRegistrySetup.setUp(self)
        self._obj = SkinsTool()
        self._BODY = _SKINSTOOL_BODY
开发者ID:goschtl,项目名称:zope,代码行数:8,代码来源:test_skins.py

示例3: setUp

    def setUp(self):
        import Products.CMFCore
        from Products.CMFCore.TypesTool import TypesTool

        BodyAdapterTestCase.setUp(self)
        zcml.load_config('configure.zcml', Products.CMFCore)

        self._obj = TypesTool()
        self._BODY = _TYPESTOOL_BODY
开发者ID:goschtl,项目名称:zope,代码行数:9,代码来源:test_typeinfo.py

示例4: setUp

    def setUp(self):
        import Products.CMFCore.exportimport
        from Products.CMFCore.CachingPolicyManager import CachingPolicyManager

        BodyAdapterTestCase.setUp(self)
        zcml.load_config('configure.zcml', Products.CMFCore.exportimport)

        self._obj = CachingPolicyManager()
        self._BODY = _CPM_BODY
开发者ID:goschtl,项目名称:zope,代码行数:9,代码来源:test_cachingpolicymgr.py

示例5: setUp

    def setUp(self):
        import Products.CMFCore.exportimport
        from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry

        BodyAdapterTestCase.setUp(self)
        zcml.load_config('configure.zcml', Products.CMFCore.exportimport)

        self._obj = ContentTypeRegistry()
        self._BODY = _CTR_BODY
开发者ID:goschtl,项目名称:zope,代码行数:9,代码来源:test_contenttyperegistry.py

示例6: setUp

    def setUp(self):
        import Products.CMFCore.exportimport
        from Products.CMFCore.PortalObject import PortalObjectBase

        BodyAdapterTestCase.setUp(self)
        zcml.load_config('configure.zcml', Products.CMFCore.exportimport)

        self._obj = PortalObjectBase('foo_site')
        self._BODY = _PROPERTIES_BODY
开发者ID:goschtl,项目名称:zope,代码行数:9,代码来源:test_properties.py

示例7: setUp

    def setUp(self):
        import Products.CMFCore.exportimport
        from Products.CMFCore.CookieCrumbler import CookieCrumbler

        BodyAdapterTestCase.setUp(self)
        zcml.load_config('configure.zcml', Products.CMFCore.exportimport)

        self._obj = CookieCrumbler('foo_cookiecrumbler')
        self._BODY = _COOKIECRUMBLER_BODY
开发者ID:goschtl,项目名称:zope,代码行数:9,代码来源:test_cookieauth.py

示例8: setUp

    def setUp(self):
        import Products.GenericSetup.PageTemplates
        from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate

        BodyAdapterTestCase.setUp(self)
        zcml.load_config('configure.zcml',
                         Products.GenericSetup.PageTemplates)

        self._obj = ZopePageTemplate('foo_template')
        self._BODY = _PAGETEMPLATE_BODY
开发者ID:goschtl,项目名称:zope,代码行数:10,代码来源:test_exportimport.py

示例9: setUp

    def setUp(self):
        import Products.CMFCore
        from Products.CMFCore.ActionsTool import ActionsTool

        BodyAdapterTestCase.setUp(self)
        zcml.load_config('configure.zcml', Products.CMFCore)

        site = DummySite('site')
        site._setObject('portal_actions', ActionsTool('portal_actions'))
        self._obj = site.portal_actions
        self._BODY = _ACTIONSTOOL_BODY
开发者ID:goschtl,项目名称:zope,代码行数:11,代码来源:test_actions.py

示例10: setUp

    def setUp(self):
        import Products.CMFCore.exportimport
        from Products.CMFCore import DirectoryView
        from Products.CMFCore.SkinsTool import SkinsTool

        BodyAdapterTestCase.setUp(self)
        _DVRegistrySetup.setUp(self)
        zcml.load_config('configure.zcml', Products.CMFCore.exportimport)

        self._obj = SkinsTool()
        self._BODY = _SKINSTOOL_BODY
开发者ID:goschtl,项目名称:zope,代码行数:11,代码来源:test_skins.py

示例11: setUp

    def setUp(self):
        from Products.CMFCore.interfaces import IActionsTool
        from Products.CMFCore.ActionsTool import ActionsTool

        BodyAdapterTestCase.setUp(self)
        site = DummySite('site')
        site._setObject('portal_actions', ActionsTool('portal_actions'))
        self._obj = site.portal_actions
        self._BODY = _ACTIONSTOOL_BODY

        # utility registration
        sm = getSiteManager()
        sm.registerUtility(self._obj, IActionsTool)
开发者ID:goschtl,项目名称:zope,代码行数:13,代码来源:test_actions.py

示例12: setUp

    def setUp(self):
        import Products.GenericSetup.PluginIndexes
        import Products.GenericSetup.ZCatalog
        import Products.GenericSetup.ZCTextIndex
        from Products.ZCatalog.ZCatalog import ZCatalog

        BodyAdapterTestCase.setUp(self)
        zcml.load_config('configure.zcml',
                         Products.GenericSetup.PluginIndexes)
        zcml.load_config('configure.zcml', Products.GenericSetup.ZCatalog)
        zcml.load_config('configure.zcml', Products.GenericSetup.ZCTextIndex)

        self._obj = ZCatalog('foo_catalog')
        self._BODY = _CATALOG_BODY % ('', '')
开发者ID:goschtl,项目名称:zope,代码行数:14,代码来源:test_exportimport.py

示例13: afterSetUp

    def afterSetUp(self):
        BodyAdapterTestCase.setUp(self)

        # Create and enable a local component registry
        createComponentRegistry(self.app)
        setHooks()
        setSite(self.app)
        sm = getSiteManager()

        tool = DummyTool()
        self.app._setObject(tool.id, tool)

        tool2 = DummyTool2()
        self.app._setObject(tool2.id, tool2)

        self._obj = sm
        self._BODY = _COMPONENTS_BODY
开发者ID:goschtl,项目名称:zope,代码行数:17,代码来源:test_components.py

示例14: afterSetUp

    def afterSetUp(self):
        BodyAdapterTestCase.setUp(self)

        # Create and enable a local component registry
        createComponentRegistry(self.app)
        setHooks()
        setSite(self.app)
        sm = getSiteManager()

        sm.registerUtility(DummyUtility(), IDummyInterface)
        sm.registerUtility(DummyUtility(), IDummyInterface, name=u'foo')

        tool = DummyTool()
        self.app._setObject(tool.id, tool)
        obj = self.app[tool.id]
        sm.registerUtility(obj, IDummyInterface, name=u'dummy tool name')

        tool2 = DummyTool2()
        self.folder._setObject(tool2.id, tool2)
        obj = self.folder[tool2.id]
        sm.registerUtility(obj, IDummyInterface, name=u'dummy tool name2')

        self._obj = sm
        self._BODY = _COMPONENTS_BODY
开发者ID:goschtl,项目名称:zope,代码行数:24,代码来源:test_components.py

示例15: setUp

    def setUp(self):
        from Products.CMFCore.PortalObject import PortalObjectBase

        BodyAdapterTestCase.setUp(self)
        self._obj = PortalObjectBase('foo_site')
        self._BODY = _PROPERTIES_BODY
开发者ID:dtgit,项目名称:dtedu,代码行数:6,代码来源:test_properties.py


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