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
def _initSite(self, mit_predikat=False): from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry site = Folder(id='site').__of__(self.app) ctr = ContentTypeRegistry() getSiteManager().registerUtility(ctr, IContentTypeRegistry) if mit_predikat: for (predicate_id, predicate_type, edit_args, content_type_name) in _TEST_PREDICATES: ctr.addPredicate(predicate_id, predicate_type) predicate = ctr.getPredicate(predicate_id) predicate.edit(*edit_args) ctr.assignTypeName(predicate_id, content_type_name) return site, ctr
def _initSite(self, mit_predikat=False): from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry self.root.site = Folder(id='site') site = self.root.site ctr = ContentTypeRegistry() site._setObject(ctr.getId(), ctr) if mit_predikat: for (predicate_id, predicate_type, edit_args, content_type_name) in _TEST_PREDICATES: ctr.addPredicate(predicate_id, predicate_type) predicate = ctr.getPredicate(predicate_id) predicate.edit(*edit_args) ctr.assignTypeName(predicate_id, content_type_name) return site
def _makeOne(self, *args, **kw): from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry return ContentTypeRegistry(*args, **kw)
def setUp(self): self.reg = ContentTypeRegistry()
def setUp(self): from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry self._obj = ContentTypeRegistry() self._BODY = _CTR_BODY
def setUp(self): from Products.CMFCore.ContentTypeRegistry import ContentTypeRegistry BodyAdapterTestCase.setUp(self) self._obj = ContentTypeRegistry() self._BODY = _CTR_BODY