Remove string concatenation in favor of string formatting
Some of the modules still utilized string concatenation instead of using formatting. In order to align with other modules in the project, I refactored these modules to use string formatting instead. Change-Id: I708392e1d03b6331a134419aa0ae9dc02a05c31b Closes-Bug: 1522738
This commit is contained in:
committed by
Jean-Emile DARTOIS
parent
62570525ad
commit
1c49d07912
@@ -128,7 +128,7 @@ class TestListAuditTemplate(api_base.FunctionalTest):
|
||||
audit_template = obj_utils.create_test_audit_template(
|
||||
self.context, id=id_,
|
||||
uuid=utils.generate_uuid(),
|
||||
name='My Audit Template ' + str(id_))
|
||||
name='My Audit Template {0}'.format(id_))
|
||||
audit_template_list.append(audit_template.uuid)
|
||||
response = self.get_json('/audit_templates')
|
||||
self.assertEqual(len(audit_template_list),
|
||||
@@ -141,12 +141,12 @@ class TestListAuditTemplate(api_base.FunctionalTest):
|
||||
for id_ in [1, 2, 3]:
|
||||
audit_template = obj_utils.create_test_audit_template(
|
||||
self.context, id=id_, uuid=utils.generate_uuid(),
|
||||
name='My Audit Template ' + str(id_))
|
||||
name='My Audit Template {0}'.format(id_))
|
||||
audit_template_list.append(audit_template.uuid)
|
||||
for id_ in [4, 5]:
|
||||
audit_template = obj_utils.create_test_audit_template(
|
||||
self.context, id=id_, uuid=utils.generate_uuid(),
|
||||
name='My Audit Template ' + str(id_))
|
||||
name='My Audit Template {0}'.format(id_))
|
||||
audit_template.soft_delete()
|
||||
response = self.get_json('/audit_templates')
|
||||
self.assertEqual(3, len(response['audit_templates']))
|
||||
@@ -158,12 +158,12 @@ class TestListAuditTemplate(api_base.FunctionalTest):
|
||||
for id_ in [1, 2, 3]:
|
||||
audit_template = obj_utils.create_test_audit_template(
|
||||
self.context, id=id_, uuid=utils.generate_uuid(),
|
||||
name='My Audit Template ' + str(id_))
|
||||
name='My Audit Template {0}'.format(id_))
|
||||
audit_template_list.append(audit_template.uuid)
|
||||
for id_ in [4, 5]:
|
||||
audit_template = obj_utils.create_test_audit_template(
|
||||
self.context, id=id_, uuid=utils.generate_uuid(),
|
||||
name='My Audit Template ' + str(id_))
|
||||
name='My Audit Template {0}'.format(id_))
|
||||
audit_template.soft_delete()
|
||||
audit_template_list.append(audit_template.uuid)
|
||||
response = self.get_json('/audit_templates',
|
||||
@@ -187,7 +187,7 @@ class TestListAuditTemplate(api_base.FunctionalTest):
|
||||
for id_ in range(5):
|
||||
obj_utils.create_test_audit_template(
|
||||
self.context, id=id_, uuid=utils.generate_uuid(),
|
||||
name='My Audit Template ' + str(id_))
|
||||
name='My Audit Template {0}'.format(id_))
|
||||
response = self.get_json('/audit_templates/?limit=3')
|
||||
self.assertEqual(3, len(response['audit_templates']))
|
||||
|
||||
@@ -199,7 +199,7 @@ class TestListAuditTemplate(api_base.FunctionalTest):
|
||||
for id_ in range(5):
|
||||
obj_utils.create_test_audit_template(
|
||||
self.context, id=id_, uuid=utils.generate_uuid(),
|
||||
name='My Audit Template ' + str(id_))
|
||||
name='My Audit Template {0}'.format(id_))
|
||||
response = self.get_json('/audit_templates')
|
||||
self.assertEqual(3, len(response['audit_templates']))
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ class TestListAudit(api_base.FunctionalTest):
|
||||
for id_ in range(5):
|
||||
audit_template = obj_utils.create_test_audit_template(
|
||||
self.context,
|
||||
name='at' + str(id_),
|
||||
name='at{0}'.format(id_),
|
||||
uuid=utils.generate_uuid())
|
||||
obj_utils.create_test_audit(
|
||||
self.context, id=id_, uuid=utils.generate_uuid(),
|
||||
|
||||
Reference in New Issue
Block a user