Commit 6343eeda authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Ayush Tiwari

ERP5TypeTestCase: Tests should consider BM while creating ERP5Site

parent 5e17819e
...@@ -1067,6 +1067,12 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin): ...@@ -1067,6 +1067,12 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
if not quiet: if not quiet:
ZopeTestCase._print('Adding %s business template ... ' % bt_title) ZopeTestCase._print('Adding %s business template ... ' % bt_title)
bt = template_tool.download(url) bt = template_tool.download(url)
# If the bt is Business Manager, update the installation state
if bt.getPortalType() == 'Business Manager':
template_tool.updateInstallationState([bt])
ZopeTestCase._print('(imported in %.3fs) ' % (time.time() - start))
continue
if not quiet: if not quiet:
ZopeTestCase._print('(imported in %.3fs) ' % (time.time() - start)) ZopeTestCase._print('(imported in %.3fs) ' % (time.time() - start))
# For unit test, we accept installing business templates with # For unit test, we accept installing business templates with
...@@ -1185,6 +1191,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin): ...@@ -1185,6 +1191,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
self._installBusinessTemplateList(business_template_list, self._installBusinessTemplateList(business_template_list,
light_install=light_install, light_install=light_install,
quiet=quiet) quiet=quiet)
self._recreateCatalog() self._recreateCatalog()
self._updateTranslationTable() self._updateTranslationTable()
self._updateConversionServerConfiguration() self._updateConversionServerConfiguration()
...@@ -1202,7 +1209,6 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin): ...@@ -1202,7 +1209,6 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
if hot_reindexing: if hot_reindexing:
setattr(app,'isIndexable', 1) setattr(app,'isIndexable', 1)
portal.portal_catalog.manage_hotReindexAll() portal.portal_catalog.manage_hotReindexAll()
portal.portal_types.resetDynamicDocumentsOnceAtTransactionBoundary() portal.portal_types.resetDynamicDocumentsOnceAtTransactionBoundary()
self.tic(not quiet) self.tic(not quiet)
......
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