def test_list(self):
    trait_descriptions = list(self.mgr.list('Foo'))
    expect = ['GET', '/v2/event_types/Foo/traits']
    self.http_client.assert_called(*expect)
    self.assertEqual(len(trait_descriptions), 3)
    for (i, vals) in enumerate([('trait_1', 'string'), ('trait_2', 'integer'), ('trait_3', 'datetime')]):
        (name, type) = vals
        self.assertEqual(trait_descriptions[i].name, name)
        self.assertEqual(trait_descriptions[i].type, type)
def test_list(self):
    trait_descriptions = list(self.mgr.list('Foo'))
    expect = ['GET', '/v2/event_types/Foo/traits']
    self.http_client.assert_called(*expect)
    self.assertEqual(len(trait_descriptions), 3)
    for (i, vals) in enumerate([('trait_1', 'string'), ('trait_2', 'integer'), ('trait_3', 'datetime')]):
        (name, type) = vals
        self.assertEqual(trait_descriptions[i].name, name)
        self.assertEqual(trait_descriptions[i].type, type)