Remove unnecessary back slash

If a statement is not long enough, it's not
necessary to split it into two lines with a back
slash, this is to remove the unnecessary back slash.

Change-Id: I0e15e8cc6eb138925d409f664871d7792d2d4e3c
This commit is contained in:
zhufl
2017-09-08 09:12:05 +08:00
parent 7fe45ac365
commit 0a1f6c44b1
3 changed files with 4 additions and 8 deletions

View File

@@ -52,8 +52,7 @@ class SecurityGroupsTestJSON(base.BaseSecurityGroupsTest):
self.client.wait_for_resource_deletion(sg['id'])
# Now check if all the created Security Groups are deleted
fetched_list = self.client.list_security_groups()['security_groups']
deleted_sgs = \
[sg for sg in security_group_list if sg in fetched_list]
deleted_sgs = [sg for sg in security_group_list if sg in fetched_list]
self.assertFalse(deleted_sgs,
"Failed to delete Security Group %s "
"list" % ', '.join(m_group['name']

View File

@@ -161,16 +161,14 @@ class TokensV3TestJSON(base.BaseIdentityV3AdminTest):
manager_project_id]
# Get available project scopes
available_projects =\
self.client.list_auth_projects()['projects']
available_projects = self.client.list_auth_projects()['projects']
# create list to save fetched project's id
fetched_project_ids = [i['id'] for i in available_projects]
# verifying the project ids in list
missing_project_ids = \
[p for p in assigned_project_ids
if p not in fetched_project_ids]
[p for p in assigned_project_ids if p not in fetched_project_ids]
self.assertEmpty(missing_project_ids,
"Failed to find project_id %s in fetched list" %
', '.join(missing_project_ids))

View File

@@ -24,8 +24,7 @@ class IdentityV3ProjectsTest(base.BaseIdentityV3Test):
@decorators.idempotent_id('86128d46-e170-4644-866a-cc487f699e1d')
def test_list_projects_returns_only_authorized_projects(self):
alt_project_name =\
self.os_alt.credentials.project_name
alt_project_name = self.os_alt.credentials.project_name
resp = self.non_admin_users_client.list_user_projects(
self.os_primary.credentials.user_id)