diff options
author | zhufl <zhu.fanglei@zte.com.cn> | 2017-03-29 14:59:58 +0800 |
---|---|---|
committer | zhufl <zhu.fanglei@zte.com.cn> | 2017-03-29 14:59:58 +0800 |
commit | f96aefe283a96ae79b0f5e6b1e7d4312246aa55b (patch) | |
tree | 85cfb622c3aec8934d552651f70cefb768f4da0a /tempest/api/identity | |
parent | f07c9da2119d4071b7976e30552ad49098d8037c (diff) | |
download | tempest-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')
-rw-r--r-- | tempest/api/identity/admin/v3/test_trusts.py | 22 | ||||
-rw-r--r-- | tempest/api/identity/v3/test_users.py | 2 |
2 files changed, 11 insertions, 13 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) diff --git a/tempest/api/identity/v3/test_users.py b/tempest/api/identity/v3/test_users.py index f26325891..e7998ee0a 100644 --- a/tempest/api/identity/v3/test_users.py +++ b/tempest/api/identity/v3/test_users.py @@ -34,8 +34,6 @@ class IdentityV3UsersTest(base.BaseIdentityV3Test): super(IdentityV3UsersTest, cls).resource_setup() cls.creds = cls.os.credentials cls.user_id = cls.creds.user_id - cls.username = cls.creds.username - cls.password = cls.creds.password def _update_password(self, original_password, password): self.non_admin_users_client.update_user_password( |