本文整理汇总了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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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
示例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)
示例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 % ('', '')
示例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
示例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
示例15: setUp
def setUp(self):
from Products.CMFCore.PortalObject import PortalObjectBase
BodyAdapterTestCase.setUp(self)
self._obj = PortalObjectBase('foo_site')
self._BODY = _PROPERTIES_BODY