Commit 42987a28 authored by Romain Courteaud's avatar Romain Courteaud

[test] Add a step to trigger all alarms

parent 4bcc727a
......@@ -59,10 +59,20 @@ class testSlapOSMixin(ERP5TypeTestCase):
finally:
setSecurityManager(sm)
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():
if alarm.isEnabled():
setattr(self, 'stepCall' + convertToUpperCase(alarm.getId()) \
+ 'Alarm', makeCallAlarm(alarm))
step_name = 'stepCall' + convertToUpperCase(alarm.getId()) + 'Alarm'
alarm_step_list.append(step_name)
setattr(self, step_name, makeCallAlarm(alarm))
setattr(self, 'stepCallAlarmList', makeCallAlarmList(alarm_step_list))
# Compatibility
# 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