summaryrefslogtreecommitdiffstats
path: root/test/test_lb.py
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-03-06 11:58:06 -0800
committerOle Trøan <otroan@employees.org>2019-03-07 22:29:44 +0000
commiteaea421e1fefedc47325f970475c5d48c899433c (patch)
treed325f642804865b6a57bf75f8ba2897bd438a8a2 /test/test_lb.py
parentea2450fa2d1e8ba0295ea9861a404796100dad1e (diff)
Tests: Refactor payload_to_info()
All callers of payload_to_info were required to wrap payload with str(). Refactor to call scapy's payload.load for raw payloads or specify the specific fieldname. Change-Id: I1c80599d4df8dc129dbb8274733afaad406d5bcf Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/test_lb.py')
-rw-r--r--test/test_lb.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_lb.py b/test/test_lb.py
index 45dab79fd42..86e7cb46ad3 100644
--- a/test/test_lb.py
+++ b/test/test_lb.py
@@ -94,7 +94,7 @@ class TestLB(VppTestCase):
self.assertEqual(gre.flags, 0)
self.assertEqual(gre.version, 0)
inner = IPver(str(gre.payload))
- payload_info = self.payload_to_info(str(inner[Raw]))
+ payload_info = self.payload_to_info(inner[Raw])
self.info = self.packet_infos[payload_info.index]
self.assertEqual(payload_info.src, self.pg0.sw_if_index)
self.assertEqual(str(inner), str(self.info.data[IPver]))