'Verify multiple agent IDs are recognized'

def testMultiAgent(self):

    request = current.request
    assertEqual = self.assertEqual
    assertTrue = self.assertTrue
    assertIn = self.assertIn
    agent_ids = ('widget-1', 'widget-2', 'widget-3')
    request._get_vars = Storage({'agent': 'widget-1,widget-2,widget-3'})
    context = S3DashboardContext()
    assertTrue((type(context.agent) is list))
    for agent_id in agent_ids:
        assertIn(agent_id, context.agent)
    assertEqual(context.bulk, True)
    request._get_vars = Storage({'agent': ['widget-1', 'widget-2,widget-3']})
    context = S3DashboardContext()
    assertTrue((type(context.agent) is list))
    for agent_id in agent_ids:
        assertIn(agent_id, context.agent)
    assertEqual(context.bulk, True)
    request._get_vars = Storage({'agent': 'widget-1,widget-2,widget-3', 'bulk': '0'})
    context = S3DashboardContext()
    assertEqual(context.bulk, True)
