X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_ip4.py;h=af0c319d4a120379ce3f14584931ebd0da431915;hb=refs%2Fchanges%2F53%2F22753%2F3;hp=60bc023a28046ee12486694b4cca6aae42dbb2dc;hpb=d6df3acf5cf31b603241574cadbf9863e27b2d60;p=vpp.git 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: