diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2018-11-24 22:19:12 -0800 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2018-11-30 07:43:05 +0000 |
commit | 978aa643ca32ab220be940290039eb11e068bb73 (patch) | |
tree | 4573250d3c0fe7a814cdd55647f2e1d86ebf770e /src/vlib/counter.c | |
parent | fa76a76bf3388f09d55d0c83e7aea507c44f9619 (diff) |
Tests: Fix traceback.
self.assertTrue(packet.haslayer(msg_type))
File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
raise self.failureException(msg)
AssertionError: 0 is not true
* Scapy packet.haslayer() returns 1 or 0.
Replace with assertEqual(packet.haslayer(), 1) to fix tracebacks.
* Scapy has multiple layers called TCP/UDP
Specify the module name to prevent namespace collisions.
* Remove duplicate import.
Change-Id: I600f9f330075cd40e1da50f8b2ceb24f645f2c20
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'src/vlib/counter.c')
0 files changed, 0 insertions, 0 deletions