Commit 4c57e592 authored by Romain Courteaud's avatar Romain Courteaud

[test] Add a step to trigger all alarms

parent cb7b5f4d
...@@ -59,10 +59,20 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -59,10 +59,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