'Verify execution of delegated widget method with multiple agents'

def testDelegationMultipleAgents(self):

    assertIn = self.assertIn
    assertEqual = self.assertEqual
    num_agents = 4
    widget = self.widget
    create_agent = widget.create_agent
    agents = []
    append = agents.append
    for i in xrange(num_agents):
        agent = create_agent(('agent%s' % i), config={'param': ('live%s' % i)})
        append(agent)
    assertEqual(len(widget.agents), num_agents)
    context = {'param': 'test'}
    for (i, agent) in enumerate(agents):
        output = agent.do('command', context)
        assertIn('param', output)
        assertEqual(output['param'], ('live%s,test' % i))
