Skip to content

Commit fba9515

Browse files
committed
Python 3: do not compare a list to a zip object
In Python 3, zip() returns a zip object, not a list. Change-Id: I1a472bec3e12b5ae3c3555cf690b99a57579ce83
1 parent b157dc9 commit fba9515

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎openstackclient/tests/network/v2/test_network.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_create_no_options(self):
4949
cmd = network.CreateNetwork(self.app, self.namespace)
5050

5151
parsed_args = self.check_parser(cmd, arglist, verifylist)
52-
result = cmd.take_action(parsed_args)
52+
result = list(cmd.take_action(parsed_args))
5353

5454
mocker.assert_called_with({
5555
RESOURCE: {
@@ -75,7 +75,7 @@ def test_create_all_options(self):
7575
cmd = network.CreateNetwork(self.app, self.namespace)
7676

7777
parsed_args = self.check_parser(cmd, arglist, verifylist)
78-
result = cmd.take_action(parsed_args)
78+
result = list(cmd.take_action(parsed_args))
7979

8080
mocker.assert_called_with({
8181
RESOURCE: {
@@ -102,7 +102,7 @@ def test_create_other_options(self):
102102
cmd = network.CreateNetwork(self.app, self.namespace)
103103

104104
parsed_args = self.check_parser(cmd, arglist, verifylist)
105-
result = cmd.take_action(parsed_args)
105+
result = list(cmd.take_action(parsed_args))
106106

107107
mocker.assert_called_with({
108108
RESOURCE: {
@@ -298,7 +298,7 @@ def test_show_no_options(self):
298298
cmd = network.ShowNetwork(self.app, self.namespace)
299299

300300
parsed_args = self.check_parser(cmd, arglist, verifylist)
301-
result = cmd.take_action(parsed_args)
301+
result = list(cmd.take_action(parsed_args))
302302

303303
mocker.assert_called_with(FAKE_ID)
304304
self.assertEqual(FILTERED, result)
@@ -313,7 +313,7 @@ def test_show_all_options(self):
313313
cmd = network.ShowNetwork(self.app, self.namespace)
314314

315315
parsed_args = self.check_parser(cmd, arglist, verifylist)
316-
result = cmd.take_action(parsed_args)
316+
result = list(cmd.take_action(parsed_args))
317317

318318
mocker.assert_called_with(FAKE_ID)
319319
self.assertEqual(FILTERED, result)

0 commit comments

Comments
 (0)