Commit 163ae39a authored by Romain Courteaud's avatar Romain Courteaud

[test] Add a step to trigger all alarms

parent 15dc398e
...@@ -60,10 +60,20 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -60,10 +60,20 @@ class testSlapOSMixin(ERP5TypeTestCase):
finally: finally:
setSecurityManager(sm) setSecurityManager(sm)
return callAlarm return callAlarm
def makeCallAlarmList(step_list):
def callAlarmList(*args, **kwargs):
for step in step_list:
getattr(self, step)()
return callAlarmList
alarm_step_list = []
for alarm in self.portal.portal_alarms.contentValues(): for alarm in self.portal.portal_alarms.contentValues():
if alarm.isEnabled(): if alarm.isEnabled():
setattr(self, 'stepCall' + convertToUpperCase(alarm.getId()) \ step_name = 'stepCall' + convertToUpperCase(alarm.getId()) + 'Alarm'
+ 'Alarm', makeCallAlarm(alarm)) alarm_step_list.append(step_name)
setattr(self, step_name, makeCallAlarm(alarm))
setattr(self, 'stepCallAlarmList', makeCallAlarmList(alarm_step_list))
# Compatibility # Compatibility
# Ensure Open Order are created before doing allocation # Ensure Open Order are created before doing allocation
......
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