diff options
| author | Dolph Mathews <dolph.mathews@gmail.com> | 2012-09-13 11:22:59 -0500 |
|---|---|---|
| committer | Dolph Mathews <dolph.mathews@gmail.com> | 2012-09-13 11:23:00 -0500 |
| commit | af8b031e7ae5c0d1cf498cd86e691dd3e9a71de1 (patch) | |
| tree | 610f65b098d5ca56f588224c23c3bc9b478cdba8 | |
| parent | 461fd623f649131a7c3b89abd76cdfa5596b522d (diff) | |
Fixed trivally true tests (bug 983304)
Change-Id: I3c66092ce54cab6d972f78857b4c386b69dcabe3
| -rw-r--r-- | tests/test_backend.py | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/tests/test_backend.py b/tests/test_backend.py index 72ed5b57..696da451 100644 --- a/tests/test_backend.py +++ b/tests/test_backend.py @@ -612,32 +612,17 @@ class IdentityTests(object): def test_list_users(self): users = self.identity_api.list_users() for test_user in default_fixtures.USERS: - user_id = test_user['id'] - found = False - for user in users: - if user['id'] == user_id: - found = True - self.assertTrue('found') + self.assertTrue(x for x in users if x['id'] == test_user['id']) def test_list_roles(self): roles = self.identity_api.list_roles() for test_role in default_fixtures.ROLES: - role_id = test_role['id'] - found = False - for role in roles: - if role['id'] == role_id: - found = True - self.assertTrue('found') + self.assertTrue(x for x in roles if x['id'] == test_role['id']) def test_get_tenants(self): tenants = self.identity_api.get_tenants() for test_tenant in default_fixtures.TENANTS: - tenant_id = test_tenant['id'] - found = False - for tenant in tenants: - if tenant['id'] == tenant_id: - found = True - self.assertTrue('found') + self.assertTrue(x for x in tenants if x['id'] == test_tenant['id']) class TokenTests(object): |
