Merge "Change to plural form of object in multi delete error message in networkv2"

This commit is contained in:
Jenkins 2016-07-14 22:41:09 +00:00 committed by Gerrit Code Review
commit 1c745700d9
4 changed files with 7 additions and 7 deletions

View File

@ -111,7 +111,7 @@ class NetworkAndComputeDelete(NetworkAndComputeCommand):
if ret:
total = len(resources)
msg = _("%(num)s of %(total)s %(resource)s failed to delete.") % {
msg = _("%(num)s of %(total)s %(resource)ss failed to delete.") % {
"num": ret,
"total": total,
"resource": self.resource,

View File

@ -211,7 +211,7 @@ class TestDeleteFloatingIPNetwork(TestFloatingIPNetwork):
self.cmd.take_action(parsed_args)
self.fail('CommandError should be raised.')
except exceptions.CommandError as e:
self.assertEqual('1 of 2 floating_ip failed to delete.', str(e))
self.assertEqual('1 of 2 floating_ips failed to delete.', str(e))
self.network.find_ip.assert_any_call(
self.floating_ips[0].id, ignore_missing=False)
@ -462,7 +462,7 @@ class TestDeleteFloatingIPCompute(TestFloatingIPCompute):
self.cmd.take_action(parsed_args)
self.fail('CommandError should be raised.')
except exceptions.CommandError as e:
self.assertEqual('1 of 2 floating_ip failed to delete.', str(e))
self.assertEqual('1 of 2 floating_ips failed to delete.', str(e))
self.compute.floating_ips.get.assert_any_call(
self.floating_ips[0].id)

View File

@ -296,7 +296,7 @@ class TestDeleteSecurityGroupNetwork(TestSecurityGroupNetwork):
self.cmd.take_action(parsed_args)
self.fail('CommandError should be raised.')
except exceptions.CommandError as e:
self.assertEqual('1 of 2 group failed to delete.', str(e))
self.assertEqual('1 of 2 groups failed to delete.', str(e))
self.network.find_security_group.assert_any_call(
self._security_groups[0].name, ignore_missing=False)
@ -384,7 +384,7 @@ class TestDeleteSecurityGroupCompute(TestSecurityGroupCompute):
self.cmd.take_action(parsed_args)
self.fail('CommandError should be raised.')
except exceptions.CommandError as e:
self.assertEqual('1 of 2 group failed to delete.', str(e))
self.assertEqual('1 of 2 groups failed to delete.', str(e))
self.compute.security_groups.get.assert_any_call(
self._security_groups[0].id)

View File

@ -739,7 +739,7 @@ class TestDeleteSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
self.cmd.take_action(parsed_args)
self.fail('CommandError should be raised.')
except exceptions.CommandError as e:
self.assertEqual('1 of 2 rule failed to delete.', str(e))
self.assertEqual('1 of 2 rules failed to delete.', str(e))
self.network.find_security_group_rule.assert_any_call(
self._security_group_rules[0].id, ignore_missing=False)
@ -819,7 +819,7 @@ class TestDeleteSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
self.cmd.take_action(parsed_args)
self.fail('CommandError should be raised.')
except exceptions.CommandError as e:
self.assertEqual('1 of 2 rule failed to delete.', str(e))
self.assertEqual('1 of 2 rules failed to delete.', str(e))
self.compute.security_group_rules.delete.assert_any_call(
self._security_group_rules[0].id)