Merge "Some keystone V3 API tests throw incorrect errors"

This commit is contained in:
Jenkins
2014-03-26 07:32:19 +00:00
committed by Gerrit Code Review
2 changed files with 12 additions and 6 deletions
@@ -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
@@ -48,7 +48,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):
@@ -62,7 +63,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):