Commit 391b51ad authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

testSlapOSMixin: cleanup, test and log

add erp5_accounting to fix the following:
runTestSuite: Adding erp5_configurator business template ... (imported in 1.134s) (missing dependencies : ['erp5_accounting']) done (5.681s)

add a test to see if all BT are correctly installed
parent 137f00bc
...@@ -49,11 +49,6 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -49,11 +49,6 @@ class testSlapOSMixin(ERP5TypeTestCase):
self.portal.portal_caches.clearAllCache() self.portal.portal_caches.clearAllCache()
self.portal.portal_workflow.refreshWorklistCache() self.portal.portal_workflow.refreshWorklistCache()
#def getDefaultSitePreferenceId(self):
# """Default id, usefull method to override
# """
# return "slapos_default_system_preference"
def createAlarmStep(self): def createAlarmStep(self):
def makeCallAlarm(alarm): def makeCallAlarm(alarm):
def callAlarm(*args, **kwargs): def callAlarm(*args, **kwargs):
...@@ -138,7 +133,7 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -138,7 +133,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
def isLiveTest(self): def isLiveTest(self):
#return 'ERP5TypeLiveTestCase' in [q.__name__ for q in self.__class__.mro()] #return 'ERP5TypeLiveTestCase' in [q.__name__ for q in self.__class__.mro()]
# XXX - What is the better way to no if we are in live test mode ? # XXX - What is the better way to know if we are in live test mode ?
return not os.environ.has_key('TEST_CA_PATH') return not os.environ.has_key('TEST_CA_PATH')
def _setUpDummyMailHost(self): def _setUpDummyMailHost(self):
...@@ -219,6 +214,7 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -219,6 +214,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
"slapos_master_configuration_workflow"] "slapos_master_configuration_workflow"]
def launchConfigurator(self): def launchConfigurator(self):
self.logMessage('SlapOS launchConfigurator')
self.login() self.login()
# Create new Configuration # Create new Configuration
business_configuration = self.getBusinessConfiguration() business_configuration = self.getBusinessConfiguration()
...@@ -233,6 +229,7 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -233,6 +229,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
business_configuration,REQUEST=self.portal.REQUEST) business_configuration,REQUEST=self.portal.REQUEST)
def bootstrapSite(self): def bootstrapSite(self):
self.logMessage('SlapOS bootstrapSite')
self.setupPortalAlarms() self.setupPortalAlarms()
self.getDefaultSystemPreference().setPreferredHateoasUrl("http://dummy/") self.getDefaultSystemPreference().setPreferredHateoasUrl("http://dummy/")
...@@ -340,6 +337,7 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -340,6 +337,7 @@ class testSlapOSMixin(ERP5TypeTestCase):
'erp5_full_text_myisam_catalog', 'erp5_full_text_myisam_catalog',
'erp5_core_proxy_field_legacy', 'erp5_core_proxy_field_legacy',
'erp5_base', 'erp5_base',
'erp5_accounting',
'erp5_workflow', 'erp5_workflow',
'erp5_configurator', 'erp5_configurator',
'slapos_configurator', 'slapos_configurator',
...@@ -361,7 +359,8 @@ class TestSlapOSDummy(testSlapOSMixin): ...@@ -361,7 +359,8 @@ class TestSlapOSDummy(testSlapOSMixin):
run_all_test = 1 run_all_test = 1
def test(self): def test(self):
"""Dummy test in order to fire up Business Template testing""" """Dummy test in order to fire up Business Template testing"""
self.assertTrue(True) bt5_list = self.portal.portal_templates.getInstalledBusinessTemplateTitleList()
self.assertTrue('slapos_erp5' in bt5_list, bt5_list)
def getTitle(self): def getTitle(self):
return "Dummy tests in order to have tests from BT5 run" return "Dummy tests in order to have tests from BT5 run"
......
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