Commit 332117e4 authored by Roque's avatar Roque

officejs_test: document module hbtree migration tests

parent 99ab115a
......@@ -76,6 +76,27 @@ class TestSlapOSConfigurator(testOfficeJSAppstoreMixin):
conversion_url = "https://cloudooo.erp5.net/"
self.assertEqual(preference_tool.getPreferredDocumentConversionServerUrl(), conversion_url)
def testDocumentModuleMigration(self):
"""
check document module folder was migrated to HBTree
"""
document_module = self.portal.document_module
self.assertEqual(document_module.getIdGenerator(), '_generatePerDayId')
self.assertEqual(document_module.isBTree(), False)
self.assertEqual(document_module.isHBTree(), True)
#check existing documents with custom ids were not migrated
existing_doc = self.portal.portal_catalog.getResultValue(
portal_type = 'File',
reference = 'data/application_sample.json')
self.assertEqual(existing_doc.getId(), 'store_officejs_data_application_sample_json')
#check new documents use new id format
doc = document_module.newContent()
self.tic()
date = doc.getCreationDate().Date().replace('/', '')
self.assertTrue(doc.getId().startswith('%s-' % date))
def notestModuleHasIdGeneratorByDay(self):
""" Ensure the Constraint sets appropriate id generator on all modules.
"""
......@@ -169,7 +190,6 @@ class TestSlapOSConfigurator(testOfficeJSAppstoreMixin):
'workflow_module',
])
def testConfiguredBusinessTemplateList(self):
""" Make sure Installed business Templates are
what it is expected. """
......
......@@ -100,11 +100,13 @@
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
......@@ -117,7 +119,9 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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