Trivial correction in variable name

As mentioned by Akihiro Motoki in I3b8a05698625baad3906784e3ecffb0f0242d660
the variable name "extra_ids" needed a cleanup, which
is done in this patch.

TrivialFix

Change-Id: I9636582a3d76332916f9502c9906dc6570709c12
This commit is contained in:
Reedip 2016-08-12 11:19:01 +05:30
parent 94b5589573
commit 5799e5daaf
2 changed files with 7 additions and 7 deletions
neutronclient/tests/unit

@ -525,7 +525,7 @@ class CLITestV20Base(base.BaseTestCase):
def _test_delete_resource(self, resource, cmd, myid, args,
cmd_resource=None, parent_id=None,
extra_ids=None):
extra_id=None):
self.mox.StubOutWithMock(cmd, "get_client")
self.mox.StubOutWithMock(self.client.httpclient, "request")
cmd.get_client().MultipleTimes().AndReturn(self.client)
@ -533,9 +533,9 @@ class CLITestV20Base(base.BaseTestCase):
cmd_resource = resource
path = getattr(self.client, cmd_resource + "_path")
self._test_set_path_and_delete(path, parent_id, myid)
# extra_ids is used to test for bulk_delete
if extra_ids:
self._test_set_path_and_delete(path, parent_id, extra_ids)
# extra_id is used to test for bulk_delete
if extra_id:
self._test_set_path_and_delete(path, parent_id, extra_id)
self.mox.ReplayAll()
cmd_parser = cmd.get_parser("delete_" + cmd_resource)
shell.run_command(cmd, cmd_parser, args)
@ -543,8 +543,8 @@ class CLITestV20Base(base.BaseTestCase):
self.mox.UnsetStubs()
_str = self.fake_stdout.make_string()
self.assertIn(myid, _str)
if extra_ids:
self.assertIn(extra_ids, _str)
if extra_id:
self.assertIn(extra_id, _str)
def _test_update_resource_action(self, resource, cmd, myid, action, args,
body, retval=None, cmd_resource=None):

@ -595,7 +595,7 @@ class CLITestV20NetworkJSON(test_cli20.CLITestV20Base):
myid1 = 'myid1'
myid2 = 'myid2'
args = [myid1, myid2]
self._test_delete_resource(resource, cmd, myid1, args, extra_ids=myid2)
self._test_delete_resource(resource, cmd, myid1, args, extra_id=myid2)
def _test_extend_list(self, mox_calls):
data = [{'id': 'netid%d' % i, 'name': 'net%d' % i,