From 787027523c1e428b556b1cd931738fe49e5412ab Mon Sep 17 00:00:00 2001 From: Frank Sigalas <antonios.sigalas@nokia.com> Date: Mon, 3 Apr 2017 20:34:08 +0300 Subject: [PATCH] add unit tests --- scapy/contrib/openflow3.uts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scapy/contrib/openflow3.uts b/scapy/contrib/openflow3.uts index 0fb844ac..b8623009 100755 --- a/scapy/contrib/openflow3.uts +++ b/scapy/contrib/openflow3.uts @@ -1,5 +1,13 @@ % Tests for OpenFlow v1.3 with Scapy ++ Fields + += GroupDescPacketListField(), check getfield +remain, lst = GroupDescPacketListField(None, None, None).getfield(None, b'\x00\x10') +not remain +all([OFPGroupDesc in gd for gd in lst]) +lst[0].length == 0x0010 + + Usual OFv1.3 messages = OFPTHello(), hello without version bitmap -- GitLab