diff options
author | Yuriy Taraday <yorik.sar@gmail.com> | 2013-03-22 21:49:26 +0400 |
---|---|---|
committer | Yuriy Taraday <yorik.sar@gmail.com> | 2013-05-27 12:36:44 +0400 |
commit | 599bc711ed9a2a9d0d08e288cd9019fd004f55b6 (patch) | |
tree | 19d4dd7ce8390f85433a46fff1b6c4974d43e052 /tests/test_backend.py | |
parent | af4e96986f6ee45e9e4ccac0b143902362a1a676 (diff) | |
download | keystone-599bc711ed9a2a9d0d08e288cd9019fd004f55b6.tar.gz keystone-599bc711ed9a2a9d0d08e288cd9019fd004f55b6.tar.xz keystone-599bc711ed9a2a9d0d08e288cd9019fd004f55b6.zip |
Replace assertDictContainsSubset with stdlib ver
Code copied and adopted from unittest.TestCase class from CPython 2.7
stdlib.
Change-Id: Ifae16f947600f7a9d1f8d1a879fd914d0cf4d65e
Diffstat (limited to 'tests/test_backend.py')
-rw-r--r-- | tests/test_backend.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_backend.py b/tests/test_backend.py index d3f830d1..5665fa54 100644 --- a/tests/test_backend.py +++ b/tests/test_backend.py @@ -134,7 +134,7 @@ class IdentityTests(object): user.pop('password') self.assertEquals(metadata_ref, {"roles": [CONF.member_role_id]}) - self.assertDictContainsSubset(user_ref, user) + self.assertDictContainsSubset(user, user_ref) self.assertDictEqual(tenant_ref, self.tenant_baz) def test_password_hashed(self): @@ -1870,12 +1870,12 @@ class IdentityTests(object): 'name': uuid.uuid4().hex} self.identity_man.create_group({}, group['id'], group) group_ref = self.identity_api.get_group(group['id']) - self.assertDictContainsSubset(group_ref, group) + self.assertDictContainsSubset(group, group_ref) group['name'] = uuid.uuid4().hex self.identity_api.update_group(group['id'], group) group_ref = self.identity_api.get_group(group['id']) - self.assertDictContainsSubset(group_ref, group) + self.assertDictContainsSubset(group, group_ref) self.identity_api.delete_group(group['id']) self.assertRaises(exception.GroupNotFound, @@ -1946,12 +1946,12 @@ class IdentityTests(object): 'domain_id': domain['id']} self.identity_man.create_project({}, project['id'], project) project_ref = self.identity_api.get_project(project['id']) - self.assertDictContainsSubset(project_ref, project) + self.assertDictContainsSubset(project, project_ref) project['name'] = uuid.uuid4().hex self.identity_api.update_project(project['id'], project) project_ref = self.identity_api.get_project(project['id']) - self.assertDictContainsSubset(project_ref, project) + self.assertDictContainsSubset(project, project_ref) self.identity_api.delete_project(project['id']) self.assertRaises(exception.ProjectNotFound, @@ -1983,14 +1983,14 @@ class IdentityTests(object): user_ref = self.identity_api.get_user(user['id']) del user['password'] user_ref_dict = dict((x, user_ref[x]) for x in user_ref) - self.assertDictContainsSubset(user_ref_dict, user) + self.assertDictContainsSubset(user, user_ref_dict) user['password'] = uuid.uuid4().hex self.identity_api.update_user(user['id'], user) user_ref = self.identity_api.get_user(user['id']) del user['password'] user_ref_dict = dict((x, user_ref[x]) for x in user_ref) - self.assertDictContainsSubset(user_ref_dict, user) + self.assertDictContainsSubset(user, user_ref_dict) self.identity_api.delete_user(user['id']) self.assertRaises(exception.UserNotFound, |