Commit 2c05d5c2 authored by Yusei Tahara's avatar Yusei Tahara

Added ContentTypeRegistry setup.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18297 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 94e85100
...@@ -107,6 +107,7 @@ class TestIngestion(ERP5TypeTestCase): ...@@ -107,6 +107,7 @@ class TestIngestion(ERP5TypeTestCase):
self.setSystemPreference() self.setSystemPreference()
self.setSimulatedNotificationScript() self.setSimulatedNotificationScript()
self.setTools() self.setTools()
self.setContentTypeRegistry()
def beforeTearDown(self): def beforeTearDown(self):
self.portal.portal_caches.clearAllCache() self.portal.portal_caches.clearAllCache()
...@@ -139,6 +140,16 @@ class TestIngestion(ERP5TypeTestCase): ...@@ -139,6 +140,16 @@ class TestIngestion(ERP5TypeTestCase):
if getattr(self.portal, 'portal_transforms', None) is None: if getattr(self.portal, 'portal_transforms', None) is None:
self.portal.manage_addProduct['PortalTransforms'].manage_addTool(type='Portal Transforms') self.portal.manage_addProduct['PortalTransforms'].manage_addTool(type='Portal Transforms')
def setContentTypeRegistry(self):
content_type_registry = self.portal.content_type_registry
predicate_id = 'Ingested Document'
if predicate_id not in content_type_registry.predicate_ids:
content_type_registry.addPredicate(predicate_id, 'extension')
content_type_registry.predicates[predicate_id][0].edit('emx')
content_type_registry.assignTypeName(predicate_id,
'Document Ingestion Message')
content_type_registry.reorderPredicate(predicate_id, 0)
################################## ##################################
## Useful methods ## Useful methods
################################## ##################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment