Commit 332117e4 authored by Roque's avatar Roque

officejs_test: document module hbtree migration tests

parent 99ab115a
...@@ -76,6 +76,27 @@ class TestSlapOSConfigurator(testOfficeJSAppstoreMixin): ...@@ -76,6 +76,27 @@ class TestSlapOSConfigurator(testOfficeJSAppstoreMixin):
conversion_url = "https://cloudooo.erp5.net/" conversion_url = "https://cloudooo.erp5.net/"
self.assertEqual(preference_tool.getPreferredDocumentConversionServerUrl(), conversion_url) 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): def notestModuleHasIdGeneratorByDay(self):
""" Ensure the Constraint sets appropriate id generator on all modules. """ Ensure the Constraint sets appropriate id generator on all modules.
""" """
...@@ -169,7 +190,6 @@ class TestSlapOSConfigurator(testOfficeJSAppstoreMixin): ...@@ -169,7 +190,6 @@ class TestSlapOSConfigurator(testOfficeJSAppstoreMixin):
'workflow_module', 'workflow_module',
]) ])
def testConfiguredBusinessTemplateList(self): def testConfiguredBusinessTemplateList(self):
""" Make sure Installed business Templates are """ Make sure Installed business Templates are
what it is expected. """ what it is expected. """
......
...@@ -100,11 +100,13 @@ ...@@ -100,11 +100,13 @@
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle> </pickle>
<pickle> <pickle>
<tuple> <dictionary>
<none/> <item>
<key> <string>_log</string> </key>
<value>
<list> <list>
<dictionary> <dictionary>
<item> <item>
...@@ -117,7 +119,9 @@ ...@@ -117,7 +119,9 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
</tuple> </value>
</item>
</dictionary>
</pickle> </pickle>
</record> </record>
</ZopeData> </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