summaryrefslogtreecommitdiff
path: root/tempest/api/identity/admin/v3/test_trusts.py
diff options
context:
space:
mode:
authorzhufl <zhu.fanglei@zte.com.cn>2017-03-29 14:59:58 +0800
committerzhufl <zhu.fanglei@zte.com.cn>2017-03-29 14:59:58 +0800
commitf96aefe283a96ae79b0f5e6b1e7d4312246aa55b (patch)
tree85cfb622c3aec8934d552651f70cefb768f4da0a /tempest/api/identity/admin/v3/test_trusts.py
parentf07c9da2119d4071b7976e30552ad49098d8037c (diff)
downloadtempest-f96aefe283a96ae79b0f5e6b1e7d4312246aa55b.tar.gz
Remove unnecessary usuage of instance variable
This is to change some instance variables to local variables, and remove some unused instance variables. Change-Id: Id2e7a1dcad4e51df488094ba9fb837410802828b
Diffstat (limited to 'tempest/api/identity/admin/v3/test_trusts.py')
-rw-r--r--tempest/api/identity/admin/v3/test_trusts.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py
index 7a569b7d4..ec64e0c57 100644
--- a/tempest/api/identity/admin/v3/test_trusts.py
+++ b/tempest/api/identity/admin/v3/test_trusts.py
@@ -46,21 +46,21 @@ class BaseTrustsV3Test(base.BaseIdentityV3AdminTest):
def create_trustor_and_roles(self):
# create a project that trusts will be granted on
- self.trustor_project_name = data_utils.rand_name(name='project')
+ trustor_project_name = data_utils.rand_name(name='project')
project = self.projects_client.create_project(
- self.trustor_project_name, domain_id='default')['project']
+ trustor_project_name, domain_id='default')['project']
self.trustor_project_id = project['id']
self.assertIsNotNone(self.trustor_project_id)
# Create a trustor User
- self.trustor_username = data_utils.rand_name('user')
- u_desc = self.trustor_username + 'description'
- u_email = self.trustor_username + '@testmail.xx'
- self.trustor_password = data_utils.rand_password()
+ trustor_username = data_utils.rand_name('user')
+ u_desc = trustor_username + 'description'
+ u_email = trustor_username + '@testmail.xx'
+ trustor_password = data_utils.rand_password()
user = self.users_client.create_user(
- name=self.trustor_username,
+ name=trustor_username,
description=u_desc,
- password=self.trustor_password,
+ password=trustor_password,
email=u_email,
project_id=self.trustor_project_id,
domain_id='default')['user']
@@ -95,10 +95,10 @@ class BaseTrustsV3Test(base.BaseIdentityV3AdminTest):
# Initialize a new client with the trustor credentials
creds = common_creds.get_credentials(
identity_version='v3',
- username=self.trustor_username,
- password=self.trustor_password,
+ username=trustor_username,
+ password=trustor_password,
user_domain_id='default',
- tenant_name=self.trustor_project_name,
+ tenant_name=trustor_project_name,
project_domain_id='default',
domain_id='default')
os = clients.Manager(credentials=creds)