diff options
Diffstat (limited to 'test/framework.py')
-rw-r--r-- | test/framework.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/framework.py b/test/framework.py index f4b168b3c75..8c0df282153 100644 --- a/test/framework.py +++ b/test/framework.py @@ -26,7 +26,7 @@ from abc import ABC, abstractmethod from struct import pack, unpack import scapy.compat -from scapy.packet import Raw +from scapy.packet import Raw, Packet import hook as hookmodule from vpp_pg_interface import VppPGInterface from vpp_sub_interface import VppSubInterface @@ -1308,7 +1308,7 @@ class VppTestCase(CPUInterface, unittest.TestCase): def send_and_expect(self, intf, pkts, output, n_rx=None, worker=None, trace=True): if not n_rx: - n_rx = len(pkts) + n_rx = 1 if isinstance(pkts, Packet) else len(pkts) self.pg_send(intf, pkts, worker=worker, trace=trace) rx = output.get_capture(n_rx) if trace: |