Tests: Fix traceback. 63/16163/4
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Sun, 25 Nov 2018 06:19:12 +0000 (22:19 -0800)
committerOle Trøan <otroan@employees.org>
Fri, 30 Nov 2018 07:43:05 +0000 (07:43 +0000)
commit978aa643ca32ab220be940290039eb11e068bb73
tree4573250d3c0fe7a814cdd55647f2e1d86ebf770e
parentfa76a76bf3388f09d55d0c83e7aea507c44f9619
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>
test/test_dhcp6.py
test/test_ip6.py
test/test_nat.py