Merge "Some keystone V3 API tests throw incorrect errors"
diff --git a/tempest/api/identity/admin/v3/test_credentials.py b/tempest/api/identity/admin/v3/test_credentials.py
index 4442f4a..6bb0ebe 100644
--- a/tempest/api/identity/admin/v3/test_credentials.py
+++ b/tempest/api/identity/admin/v3/test_credentials.py
@@ -36,21 +36,25 @@
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):
diff --git a/tempest/api/identity/admin/v3/test_roles.py b/tempest/api/identity/admin/v3/test_roles.py
index 3386238..24c7b83 100644
--- a/tempest/api/identity/admin/v3/test_roles.py
+++ b/tempest/api/identity/admin/v3/test_roles.py
@@ -48,7 +48,8 @@
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 @@
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):