summaryrefslogtreecommitdiffstats
path: root/test/test_ip4.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-10-15 19:31:55 +0200
committerNeale Ranns <nranns@cisco.com>2019-10-16 15:00:45 +0000
commit6ed154f779c765f38b61ed84349bd539287dd02b (patch)
tree94821fb30d58ee909528bd3fecdd5c3e1dd1461c /test/test_ip4.py
parentd6df3acf5cf31b603241574cadbf9863e27b2d60 (diff)
tests: cli wrapper should return string
Python3 fixes. Type: fix Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I648b2142d45dfab9146a02eeb1b12de11103ff9f Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test/test_ip4.py')
-rw-r--r--test/test_ip4.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_ip4.py b/test/test_ip4.py
index 60bc023a280..af0c319d4a1 100644
--- a/test/test_ip4.py
+++ b/test/test_ip4.py
@@ -100,7 +100,7 @@ class TestIPv4(VppTestCase):
:param int packet_size: Required packet size.
:param Scapy pkt: Packet to be modified.
"""
- dst_if_idx = packet_size / 10 % 2
+ dst_if_idx = int(packet_size / 10 % 2)
dst_if = self.flows[src_if][dst_if_idx]
info = self.create_packet_info(src_if, dst_if)
payload = self.info_to_payload(info)
@@ -377,7 +377,7 @@ class TestICMPEcho(VppTestCase):
icmp_id = 0xb
icmp_seq = 5
- icmp_load = '\x0a' * 18
+ icmp_load = b'\x0a' * 18
p_echo_request = (Ether(src=self.pg0.remote_mac,
dst=self.pg0.local_mac) /
IP(src=self.pg0.remote_ip4, dst=self.pg0.local_ip4) /
@@ -1938,7 +1938,7 @@ class TestIPv4Frag(VppTestCase):
packets = self.dst_if.get_capture(3)
# Assume VPP sends the fragments in order
- payload = ''
+ payload = b''
for p in packets:
payload_offset = p.frag * 8
if payload_offset > 0: