Merge "Drop izip and izip_longest removed in python3"
This commit is contained in:
commit
83b1427a43
@ -11,7 +11,6 @@
|
||||
# under the License.
|
||||
|
||||
import collections
|
||||
import itertools
|
||||
import logging
|
||||
import sys
|
||||
|
||||
@ -137,8 +136,8 @@ class FormsetDataTableMixin(object):
|
||||
else:
|
||||
formset = self.get_formset()
|
||||
formset.is_valid()
|
||||
for datum, form in itertools.izip_longest(self.filtered_data,
|
||||
formset):
|
||||
for datum, form in six.moves.zip_longest(self.filtered_data,
|
||||
formset):
|
||||
row = self._meta.row_class(self, datum, form)
|
||||
if self.get_object_id(datum) == self.current_item_id:
|
||||
self.selected = True
|
||||
|
@ -14,12 +14,12 @@
|
||||
|
||||
import collections
|
||||
import copy
|
||||
import itertools
|
||||
import uuid
|
||||
|
||||
from django import http
|
||||
from django.test.utils import override_settings
|
||||
from mox3.mox import IsA # noqa
|
||||
import six
|
||||
|
||||
from novaclient.v2 import floating_ip_pools
|
||||
|
||||
@ -369,7 +369,7 @@ class NetworkApiNeutronSecurityGroupTests(NetworkApiNeutronTestBase):
|
||||
self.assertEqual(exp_sg['name'], ret_sg.name)
|
||||
exp_rules = exp_sg['security_group_rules']
|
||||
self.assertEqual(len(exp_rules), len(ret_sg.rules))
|
||||
for (exprule, retrule) in itertools.izip(exp_rules, ret_sg.rules):
|
||||
for (exprule, retrule) in six.moves.zip(exp_rules, ret_sg.rules):
|
||||
self._cmp_sg_rule(exprule, retrule)
|
||||
|
||||
def test_security_group_list(self):
|
||||
@ -382,7 +382,7 @@ class NetworkApiNeutronSecurityGroupTests(NetworkApiNeutronTestBase):
|
||||
|
||||
rets = api.network.security_group_list(self.request)
|
||||
self.assertEqual(len(sgs), len(rets))
|
||||
for (exp, ret) in itertools.izip(sgs, rets):
|
||||
for (exp, ret) in six.moves.zip(sgs, rets):
|
||||
self._cmp_sg(exp, ret)
|
||||
|
||||
def test_security_group_get(self):
|
||||
|
Loading…
Reference in New Issue
Block a user