1class Scenario(object): 2 """ 3 A scenario with a number of actions to perform. 4 """ 5 def __init__(self, *args): 6 self.actions = args 7 8 def execute(self, context): 9 """ 10 Executes the scenario. 11 12 @param context ActionContext instance providing the dependencies for 13 the actions in the scenario. 14 """ 15 for action in self.actions: 16 action.execute(context) 17 18 def __repr__(self): 19 return 'Scenario [actions=%s]' % str(self.actions) 20 21