Some keystone V3 API tests throw incorrect errors

Change-Id: I43a80861a087daa512ded7288ed2a4aa59363a7c
Closes-Bug: 1295434
This commit is contained in:
Tushar Kalra committed 2014-03-24 12:26:23 -07:00
1 parent 86a2c8d827
commit ed26061138
2 files changed
+12 -6

No files matched your search

@@ -36,21 +36,25 @@ class CredentialsTestJSON(base.BaseIdentityV3AdminTest):
resp, cls.project = cls.client.create_project(
data_utils.rand_name('project-'),
description=data_utils.rand_name('project-desc-'))
assert resp['status'] == '201', "Expected %s" % resp['status']
assert resp['status'] == '201', (
"Expected 201, but got: %s" % resp['status'])
cls.projects.append(cls.project['id'])
resp, cls.user_body = cls.client.create_user(
u_name, description=u_desc, password=u_password,
email=u_email, project_id=cls.projects[0])
assert resp['status'] == '201', "Expected: %s" % resp['status']
assert resp['status'] == '201', (
"Expected 201, but got: %s" % resp['status'])
@classmethod
def tearDownClass(cls):
resp, _ = cls.client.delete_user(cls.user_body['id'])
assert resp['status'] == '204', "Expected: %s" % resp['status']
assert resp['status'] == '204', (
"Expected 204, but got: %s" % resp['status'])
for p in cls.projects:
resp, _ = cls.client.delete_project(p)
assert resp['status'] == '204', "Expected: %s" % resp['status']
assert resp['status'] == '204', (
"Expected 204, but got: %s" % resp['status'])
super(CredentialsTestJSON, cls).tearDownClass()
def _delete_credential(self, cred_id):
+4 -2
View File
@@ -47,7 +47,8 @@ class RolesV3TestJSON(base.BaseIdentityV3AdminTest):
resp[4], cls.role = cls.client.create_role(
data_utils.rand_name('Role-'))
for r in resp:
assert r['status'] == '201', "Expected: %s" % r['status']
assert r['status'] == '201', (
"Expected 201, but got: %s" % r['status'])
@classmethod
def tearDownClass(cls):
@@ -61,7 +62,8 @@ class RolesV3TestJSON(base.BaseIdentityV3AdminTest):
cls.client.update_domain(cls.domain['id'], enabled=False)
resp[4], _ = cls.client.delete_domain(cls.domain['id'])
for r in resp:
assert r['status'] == '204', "Expected: %s" % r['status']
assert r['status'] == '204', (
"Expected 204, but got: %s" % r['status'])
super(RolesV3TestJSON, cls).tearDownClass()
def _list_assertions(self, resp, body, fetched_role_ids, role_id):