diff options
Diffstat (limited to 'test/test_reassembly.py')
-rw-r--r-- | test/test_reassembly.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/test_reassembly.py b/test/test_reassembly.py index d7cc627a318..95fefdb5aa1 100644 --- a/test/test_reassembly.py +++ b/test/test_reassembly.py @@ -1,4 +1,6 @@ #!/usr/bin/env python + +import six import unittest from random import shuffle @@ -77,7 +79,7 @@ class TestIPv4Reassembly(VppTestCase): def create_fragments(cls): infos = cls._packet_infos cls.pkt_infos = [] - for index, info in infos.iteritems(): + for index, info in six.iteritems(infos): p = info.data # cls.logger.debug(ppp("Packet:", p.__class__(str(p)))) fragments_400 = fragment_rfc791(p, 400) @@ -414,7 +416,7 @@ class TestIPv6Reassembly(VppTestCase): def create_fragments(cls): infos = cls._packet_infos cls.pkt_infos = [] - for index, info in infos.iteritems(): + for index, info in six.iteritems(infos): p = info.data # cls.logger.debug(ppp("Packet:", p.__class__(str(p)))) fragments_400 = fragment_rfc8200(p, info.index, 400) @@ -805,7 +807,7 @@ class TestIPv4ReassemblyLocalNode(VppTestCase): def create_fragments(cls): infos = cls._packet_infos cls.pkt_infos = [] - for index, info in infos.iteritems(): + for index, info in six.iteritems(infos): p = info.data # cls.logger.debug(ppp("Packet:", p.__class__(str(p)))) fragments_300 = fragment_rfc791(p, 300) @@ -984,7 +986,7 @@ class TestFIFReassembly(VppTestCase): self.extend_packet(p, size, self.padding) info.data = p[IP] # use only IP part, without ethernet header - fragments = [x for _, p in self._packet_infos.iteritems() + fragments = [x for _, p in six.iteritems(self._packet_infos) for x in fragment_rfc791(p.data, 400)] encapped_fragments = \ @@ -1050,7 +1052,7 @@ class TestFIFReassembly(VppTestCase): self.extend_packet(p, size, self.padding) info.data = p[IPv6] # use only IPv6 part, without ethernet header - fragments = [x for _, i in self._packet_infos.iteritems() + fragments = [x for _, i in six.iteritems(self._packet_infos) for x in fragment_rfc8200( i.data, i.index, 400)] |