diff options
author | Ole Troan <ot@cisco.com> | 2019-11-07 13:52:21 +0100 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-11-08 13:25:56 +0000 |
commit | 770a0deaadfb2d26cbc5da05f84578a7bd92e9d2 (patch) | |
tree | df34de2e51331ab7ae868ecc7f253469f8448981 /test/test_ip_mcast.py | |
parent | 76a36e83e39cbf7828a647d8afadfaef642e1c84 (diff) |
tests: python3 use byte strings in raw()
Raw('\xaf) and Raw(b'\xaf) are two quite different things in python 2 versus 3.
In most cases this didn't make a difference, apart from those cases where length
of payload actually mattered.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I3cba5c1486e436a3ca8aa10a7b393da75aa9f6b9
Diffstat (limited to 'test/test_ip_mcast.py')
-rw-r--r-- | test/test_ip_mcast.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_ip_mcast.py b/test/test_ip_mcast.py index f7a50825d81..d7a8238e35b 100644 --- a/test/test_ip_mcast.py +++ b/test/test_ip_mcast.py @@ -100,7 +100,7 @@ class TestIPMcast(VppTestCase): UDP(sport=1234, dport=1234)) if not payload_size: payload_size = 64 - len(p) - p = p / Raw('\xa5' * payload_size) + p = p / Raw(b'\xa5' * payload_size) for i in range(0, N_PKTS_IN_STREAM): pkts.append(p) @@ -847,7 +847,7 @@ class TestIPMcast(VppTestCase): GRE() / IP(src="1.1.1.1", dst="232.2.2.2") / UDP(sport=1234, dport=1234) / - Raw('\a5' * 64)) * 63 + Raw(b'\a5' * 64)) * 63 self.vapi.cli("clear trace") self.pg1.add_stream(tx) |