diff --git a/test/test_dhcp6.py b/test/test_dhcp6.py
index fe06f98..6c20386 100644
--- a/test/test_dhcp6.py
+++ b/test/test_dhcp6.py
@@ -61,8 +61,8 @@
         self.assertEqual(len(rx_list), 1)
         packet = rx_list[0]
 
-        self.assertTrue(packet.haslayer(IPv6))
-        self.assertTrue(packet[IPv6].haslayer(DHCP6_Solicit))
+        self.assertEqual(packet.haslayer(IPv6), 1)
+        self.assertEqual(packet[IPv6].haslayer(DHCP6_Solicit), 1)
 
         client_duid = packet[DHCP6OptClientId].duid
         trid = packet[DHCP6_Solicit].trid
@@ -137,8 +137,8 @@
         self.assertEqual(len(rx_list), 1)
         packet = rx_list[0]
 
-        self.assertTrue(packet.haslayer(IPv6))
-        self.assertTrue(packet[IPv6].haslayer(DHCP6_Solicit))
+        self.assertEqual(packet.haslayer(IPv6), 1)
+        self.assertEqual(packet[IPv6].haslayer(DHCP6_Solicit), 1)
 
         client_duid = packet[DHCP6OptClientId].duid
         trid = packet[DHCP6_Solicit].trid
@@ -256,7 +256,7 @@
 
     def validate_packet(self, packet, msg_type, is_resend=False):
         try:
-            self.assertTrue(packet.haslayer(msg_type))
+            self.assertEqual(packet.haslayer(msg_type), 1)
             client_duid = packet[DHCP6OptClientId].duid
             if self.client_duid is None:
                 self.client_duid = client_duid
@@ -508,7 +508,7 @@
 
     def validate_packet(self, packet, msg_type, is_resend=False):
         try:
-            self.assertTrue(packet.haslayer(msg_type))
+            self.assertEqual(packet.haslayer(msg_type), 1)
             client_duid = packet[DHCP6OptClientId].duid
             if self.client_duid is None:
                 self.client_duid = client_duid
diff --git a/test/test_ip6.py b/test/test_ip6.py
index 1d7fa76..849e9f7 100644
--- a/test/test_ip6.py
+++ b/test/test_ip6.py
@@ -15,8 +15,9 @@
 
 from scapy.packet import Raw
 from scapy.layers.l2 import Ether, Dot1Q
-from scapy.layers.inet6 import IPv6, UDP, TCP, ICMPv6ND_NS, ICMPv6ND_RS, \
-    ICMPv6ND_RA, ICMPv6NDOptSrcLLAddr, getmacbyip6, ICMPv6MRD_Solicitation, \
+import scapy.layers.inet6 as inet6
+from scapy.layers.inet6 import IPv6, ICMPv6ND_NS, ICMPv6ND_RS, \
+    ICMPv6ND_RA, getmacbyip6, ICMPv6MRD_Solicitation, \
     ICMPv6NDOptMTU, ICMPv6NDOptSrcLLAddr, ICMPv6NDOptPrefixInfo, \
     ICMPv6ND_NA, ICMPv6NDOptDstLLAddr, ICMPv6DestUnreach, icmp6types, \
     ICMPv6TimeExceeded, ICMPv6EchoRequest, ICMPv6EchoReply
@@ -25,7 +26,6 @@
 from scapy.utils import inet_pton, inet_ntop
 from scapy.contrib.mpls import MPLS
 
-
 AF_INET6 = socket.AF_INET6
 
 
@@ -74,7 +74,8 @@
                          in6_ptop(dst_ip))
 
         # and come from the target address
-        self.assertEqual(in6_ptop(rx[IPv6].src), in6_ptop(tgt_ip))
+        self.assertEqual(
+            in6_ptop(rx[IPv6].src), in6_ptop(tgt_ip))
 
         # Dest link-layer options should have the router's MAC
         dll = rx[ICMPv6NDOptDstLLAddr]
@@ -92,14 +93,16 @@
 
         # the rx'd NS should be addressed to an mcast address
         # derived from the target address
-        self.assertEqual(in6_ptop(rx[IPv6].dst), in6_ptop(dst_ip))
+        self.assertEqual(
+            in6_ptop(rx[IPv6].dst), in6_ptop(dst_ip))
 
         # expect the tgt IP in the NS header
         ns = rx[ICMPv6ND_NS]
         self.assertEqual(in6_ptop(ns.tgt), in6_ptop(tgt_ip))
 
         # packet is from the router's local address
-        self.assertEqual(in6_ptop(rx[IPv6].src), intf.local_ip6)
+        self.assertEqual(
+            in6_ptop(rx[IPv6].src), intf.local_ip6)
 
         # Src link-layer options should have the router's MAC
         sll = rx[ICMPv6NDOptSrcLLAddr]
@@ -261,7 +264,7 @@
         dst_if = self.flows[src_if][dst_if_idx]
         info = self.create_packet_info(src_if, dst_if)
         payload = self.info_to_payload(info)
-        p = pkt/Raw(payload)
+        p = pkt / Raw(payload)
         p[IPv6].dst = dst_if.remote_ip6
         info.data = p.copy()
         if isinstance(src_if, VppSubInterface):
@@ -278,7 +281,7 @@
         hdr_ext = 4 if isinstance(src_if, VppSubInterface) else 0
         pkt_tmpl = (Ether(dst=src_if.local_mac, src=src_if.remote_mac) /
                     IPv6(src=src_if.remote_ip6) /
-                    UDP(sport=1234, dport=1234))
+                    inet6.UDP(sport=1234, dport=1234))
 
         pkts = [self.modify_packet(src_if, i, pkt_tmpl)
                 for i in xrange(self.pg_if_packet_sizes[0],
@@ -312,7 +315,7 @@
             self.assertTrue(Dot1Q not in packet)
             try:
                 ip = packet[IPv6]
-                udp = packet[UDP]
+                udp = packet[inet6.UDP]
                 payload_info = self.payload_to_info(str(packet[Raw]))
                 packet_index = payload_info.index
                 self.assertEqual(payload_info.dst, dst_sw_if_index)
@@ -327,10 +330,14 @@
                 self.assertEqual(packet_index, next_info.index)
                 saved_packet = next_info.data
                 # Check standard fields
-                self.assertEqual(ip.src, saved_packet[IPv6].src)
-                self.assertEqual(ip.dst, saved_packet[IPv6].dst)
-                self.assertEqual(udp.sport, saved_packet[UDP].sport)
-                self.assertEqual(udp.dport, saved_packet[UDP].dport)
+                self.assertEqual(
+                    ip.src, saved_packet[IPv6].src)
+                self.assertEqual(
+                    ip.dst, saved_packet[IPv6].dst)
+                self.assertEqual(
+                    udp.sport, saved_packet[inet6.UDP].sport)
+                self.assertEqual(
+                    udp.dport, saved_packet[inet6.UDP].dport)
             except:
                 self.logger.error(ppp("Unexpected or invalid packet:", packet))
                 raise
@@ -385,7 +392,8 @@
         p = (Ether(dst=in6_getnsmac(nsma)) /
              IPv6(dst=d, src="2002::2") /
              ICMPv6ND_NS(tgt=self.pg0.local_ip6) /
-             ICMPv6NDOptSrcLLAddr(lladdr=self.pg0.remote_mac))
+             ICMPv6NDOptSrcLLAddr(
+                 lladdr=self.pg0.remote_mac))
         pkts = [p]
 
         self.send_and_assert_no_replies(
@@ -403,7 +411,8 @@
             p = (Ether(dst=in6_getnsmac(nsma)) /
                  IPv6(dst=d, src=self.pg0.remote_ip6) /
                  ICMPv6ND_NS(tgt=self.pg0.local_ip6) /
-                 ICMPv6NDOptSrcLLAddr(lladdr=self.pg0.remote_mac))
+                 ICMPv6NDOptSrcLLAddr(
+                     lladdr=self.pg0.remote_mac))
             pkts = [p]
 
             self.send_and_assert_no_replies(
@@ -419,7 +428,8 @@
         p = (Ether(dst=in6_getnsmac(nsma)) /
              IPv6(dst=d, src=self.pg0.remote_ip6) /
              ICMPv6ND_NS(tgt="fd::ffff") /
-             ICMPv6NDOptSrcLLAddr(lladdr=self.pg0.remote_mac))
+             ICMPv6NDOptSrcLLAddr(
+                 lladdr=self.pg0.remote_mac))
         pkts = [p]
 
         self.send_and_assert_no_replies(self.pg0, pkts,
@@ -454,9 +464,11 @@
         # address
         #
         p = (Ether(dst=in6_getnsmac(nsma), src=self.pg0.remote_mac) /
-             IPv6(dst=d, src=self.pg0._remote_hosts[2].ip6_ll) /
+             IPv6(
+                 dst=d, src=self.pg0._remote_hosts[2].ip6_ll) /
              ICMPv6ND_NS(tgt=self.pg0.local_ip6) /
-             ICMPv6NDOptSrcLLAddr(lladdr=self.pg0.remote_mac))
+             ICMPv6NDOptSrcLLAddr(
+                 lladdr=self.pg0.remote_mac))
 
         self.send_and_expect_na(self.pg0, p,
                                 "NS from link-local",
@@ -480,9 +492,11 @@
         # An NS to the router's own Link-local
         #
         p = (Ether(dst=in6_getnsmac(nsma), src=self.pg0.remote_mac) /
-             IPv6(dst=d, src=self.pg0._remote_hosts[3].ip6_ll) /
+             IPv6(
+                 dst=d, src=self.pg0._remote_hosts[3].ip6_ll) /
              ICMPv6ND_NS(tgt=self.pg0.local_ip6_ll) /
-             ICMPv6NDOptSrcLLAddr(lladdr=self.pg0.remote_mac))
+             ICMPv6NDOptSrcLLAddr(
+                 lladdr=self.pg0.remote_mac))
 
         self.send_and_expect_na(self.pg0, p,
                                 "NS to/from link-local",
@@ -533,7 +547,7 @@
                    src=self.pg0.remote_mac) /
              IPv6(src=self.pg0.remote_ip6,
                   dst=self.pg1.remote_hosts[1].ip6) /
-             UDP(sport=1234, dport=1234) /
+             inet6.UDP(sport=1234, dport=1234) /
              Raw())
 
         self.pg0.add_stream(p)
@@ -604,7 +618,8 @@
 
         if not pi_opt:
             # the RA should not contain prefix information
-            self.assertFalse(ra.haslayer(ICMPv6NDOptPrefixInfo))
+            self.assertFalse(ra.haslayer(
+                ICMPv6NDOptPrefixInfo))
         else:
             raos = rx.getlayer(ICMPv6NDOptPrefixInfo, 1)
 
@@ -613,14 +628,16 @@
             # nested classes, so a direct obj1=obj2 comparison always fails.
             # however, the getlayer(.., 2) does give one instnace.
             # so we cheat here and construct a new opt instnace for comparison
-            rd = ICMPv6NDOptPrefixInfo(prefixlen=raos.prefixlen,
-                                       prefix=raos.prefix,
-                                       L=raos.L,
-                                       A=raos.A)
+            rd = ICMPv6NDOptPrefixInfo(
+                prefixlen=raos.prefixlen,
+                prefix=raos.prefix,
+                L=raos.L,
+                A=raos.A)
             if type(pi_opt) is list:
                 for ii in range(len(pi_opt)):
                     self.assertEqual(pi_opt[ii], rd)
-                    rd = rx.getlayer(ICMPv6NDOptPrefixInfo, ii+2)
+                    rd = rx.getlayer(
+                        ICMPv6NDOptPrefixInfo, ii + 2)
             else:
                 self.assertEqual(pi_opt, raos)
 
@@ -657,7 +674,8 @@
         #  - expect an RA in return
         #
         p = (Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
-             IPv6(dst=self.pg0.local_ip6, src=self.pg0.remote_ip6) /
+             IPv6(
+                 dst=self.pg0.local_ip6, src=self.pg0.remote_ip6) /
              ICMPv6ND_RS())
         pkts = [p]
         self.send_and_expect_ra(self.pg0, pkts, "Genuine RS")
@@ -680,7 +698,8 @@
         #
         self.pg0.ip6_ra_config(send_unicast=1)
         p = (Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
-             IPv6(dst=self.pg0.local_ip6, src="2002::ffff") /
+             IPv6(dst=self.pg0.local_ip6,
+                  src="2002::ffff") /
              ICMPv6ND_RS())
         pkts = [p]
         self.send_and_assert_no_replies(self.pg0, pkts,
@@ -740,10 +759,11 @@
         #
         # RAs should now contain the prefix information option
         #
-        opt = ICMPv6NDOptPrefixInfo(prefixlen=self.pg0.local_ip6_prefix_len,
-                                    prefix=self.pg0.local_ip6,
-                                    L=1,
-                                    A=1)
+        opt = ICMPv6NDOptPrefixInfo(
+            prefixlen=self.pg0.local_ip6_prefix_len,
+            prefix=self.pg0.local_ip6,
+            L=1,
+            A=1)
 
         self.pg0.ip6_ra_config(send_unicast=1)
         ll = mk_ll_addr(self.pg0.remote_mac)
@@ -763,10 +783,11 @@
                                self.pg0.local_ip6_prefix_len,
                                off_link=1)
 
-        opt = ICMPv6NDOptPrefixInfo(prefixlen=self.pg0.local_ip6_prefix_len,
-                                    prefix=self.pg0.local_ip6,
-                                    L=0,
-                                    A=1)
+        opt = ICMPv6NDOptPrefixInfo(
+            prefixlen=self.pg0.local_ip6_prefix_len,
+            prefix=self.pg0.local_ip6,
+            L=0,
+            A=1)
 
         self.pg0.ip6_ra_config(send_unicast=1)
         self.send_and_expect_ra(self.pg0, p,
@@ -783,10 +804,11 @@
                                off_link=1,
                                no_autoconfig=1)
 
-        opt = ICMPv6NDOptPrefixInfo(prefixlen=self.pg0.local_ip6_prefix_len,
-                                    prefix=self.pg0.local_ip6,
-                                    L=0,
-                                    A=0)
+        opt = ICMPv6NDOptPrefixInfo(
+            prefixlen=self.pg0.local_ip6_prefix_len,
+            prefix=self.pg0.local_ip6,
+            L=0,
+            A=0)
 
         self.pg0.ip6_ra_config(send_unicast=1)
         self.send_and_expect_ra(self.pg0, p,
@@ -801,10 +823,11 @@
         self.pg0.ip6_ra_prefix(self.pg0.local_ip6n,
                                self.pg0.local_ip6_prefix_len)
 
-        opt = ICMPv6NDOptPrefixInfo(prefixlen=self.pg0.local_ip6_prefix_len,
-                                    prefix=self.pg0.local_ip6,
-                                    L=1,
-                                    A=1)
+        opt = ICMPv6NDOptPrefixInfo(
+            prefixlen=self.pg0.local_ip6_prefix_len,
+            prefix=self.pg0.local_ip6,
+            L=1,
+            A=1)
 
         self.pg0.ip6_ra_config(send_unicast=1)
         self.send_and_expect_ra(self.pg0, p,
@@ -821,10 +844,11 @@
                                off_link=1,
                                no_autoconfig=1)
 
-        opt = ICMPv6NDOptPrefixInfo(prefixlen=self.pg0.local_ip6_prefix_len,
-                                    prefix=self.pg0.local_ip6,
-                                    L=0,
-                                    A=0)
+        opt = ICMPv6NDOptPrefixInfo(
+            prefixlen=self.pg0.local_ip6_prefix_len,
+            prefix=self.pg0.local_ip6,
+            L=0,
+            A=0)
 
         self.pg0.ip6_ra_config(send_unicast=1)
         self.send_and_expect_ra(self.pg0, p,
@@ -840,10 +864,11 @@
                                self.pg0.local_ip6_prefix_len,
                                use_default=1)
 
-        opt = ICMPv6NDOptPrefixInfo(prefixlen=self.pg0.local_ip6_prefix_len,
-                                    prefix=self.pg0.local_ip6,
-                                    L=1,
-                                    A=1)
+        opt = ICMPv6NDOptPrefixInfo(
+            prefixlen=self.pg0.local_ip6_prefix_len,
+            prefix=self.pg0.local_ip6,
+            L=1,
+            A=1)
 
         self.pg0.ip6_ra_config(send_unicast=1)
         self.send_and_expect_ra(self.pg0, p,
@@ -859,14 +884,16 @@
                                off_link=1,
                                no_autoconfig=1)
 
-        opt = [ICMPv6NDOptPrefixInfo(prefixlen=self.pg0.local_ip6_prefix_len,
-                                     prefix=self.pg0.local_ip6,
-                                     L=1,
-                                     A=1),
-               ICMPv6NDOptPrefixInfo(prefixlen=self.pg1.local_ip6_prefix_len,
-                                     prefix=self.pg1.local_ip6,
-                                     L=0,
-                                     A=0)]
+        opt = [ICMPv6NDOptPrefixInfo(
+            prefixlen=self.pg0.local_ip6_prefix_len,
+            prefix=self.pg0.local_ip6,
+            L=1,
+            A=1),
+            ICMPv6NDOptPrefixInfo(
+                prefixlen=self.pg1.local_ip6_prefix_len,
+                prefix=self.pg1.local_ip6,
+                L=0,
+                A=0)]
 
         self.pg0.ip6_ra_config(send_unicast=1)
         ll = mk_ll_addr(self.pg0.remote_mac)
@@ -886,10 +913,11 @@
                                self.pg0.local_ip6_prefix_len,
                                is_no=1)
 
-        opt = ICMPv6NDOptPrefixInfo(prefixlen=self.pg1.local_ip6_prefix_len,
-                                    prefix=self.pg1.local_ip6,
-                                    L=0,
-                                    A=0)
+        opt = ICMPv6NDOptPrefixInfo(
+            prefixlen=self.pg1.local_ip6_prefix_len,
+            prefix=self.pg1.local_ip6,
+            L=0,
+            A=0)
 
         self.pg0.ip6_ra_config(send_unicast=1)
         self.send_and_expect_ra(self.pg0, p,
@@ -952,8 +980,10 @@
                                 dst=self.pg0.local_mac) /
                           IPv6(src=self.pg0.remote_ip6,
                                dst=self.pg0.local_ip6) /
-                          ICMPv6EchoRequest(id=icmpv6_id, seq=icmpv6_seq,
-                                            data=icmpv6_data))
+                          ICMPv6EchoRequest(
+                              id=icmpv6_id,
+                              seq=icmpv6_seq,
+                              data=icmpv6_data))
 
         self.pg0.add_stream(p_echo_request)
         self.pg_enable_capture(self.pg_interfaces)
@@ -971,7 +1001,8 @@
         self.assertEqual(ipv6.src, self.pg0.local_ip6)
         self.assertEqual(ipv6.dst, self.pg0.remote_ip6)
 
-        self.assertEqual(icmp6types[icmpv6.type], "Echo Reply")
+        self.assertEqual(
+            icmp6types[icmpv6.type], "Echo Reply")
         self.assertEqual(icmpv6.id, icmpv6_id)
         self.assertEqual(icmpv6.seq, icmpv6_seq)
         self.assertEqual(icmpv6.data, icmpv6_data)
@@ -1014,17 +1045,21 @@
         rx_list = self.pg1.get_capture(count, timeout=3)
         self.assertEqual(len(rx_list), count)
         for packet in rx_list:
-            self.assertTrue(packet.haslayer(IPv6))
-            self.assertTrue(packet[IPv6].haslayer(ICMPv6ND_RS))
+            self.assertEqual(packet.haslayer(IPv6), 1)
+            self.assertEqual(packet[IPv6].haslayer(
+                ICMPv6ND_RS), 1)
             dst = ip6_normalize(packet[IPv6].dst)
             dst2 = ip6_normalize("ff02::2")
             self.assert_equal(dst, dst2)
             src = ip6_normalize(packet[IPv6].src)
             src2 = ip6_normalize(self.pg1.local_ip6_ll)
             self.assert_equal(src, src2)
-            self.assertTrue(packet[ICMPv6ND_RS].haslayer(ICMPv6NDOptSrcLLAddr))
-            self.assert_equal(packet[ICMPv6NDOptSrcLLAddr].lladdr,
-                              self.pg1.local_mac)
+            self.assertTrue(
+                bool(packet[ICMPv6ND_RS].haslayer(
+                    ICMPv6NDOptSrcLLAddr)))
+            self.assert_equal(
+                packet[ICMPv6NDOptSrcLLAddr].lladdr,
+                self.pg1.local_mac)
 
     def verify_prefix_info(self, reported_prefix, prefix_option):
         prefix = socket.inet_pton(socket.AF_INET6,
@@ -1160,7 +1195,8 @@
         self.sleep(0.1)
 
         # send RA
-        packet = (self.create_ra_packet(self.pg0) / ICMPv6NDOptPrefixInfo(
+        packet = (self.create_ra_packet(
+            self.pg0) / ICMPv6NDOptPrefixInfo(
             prefix="1::",
             prefixlen=64,
             validlifetime=2,
@@ -1300,9 +1336,11 @@
         # on the link that has the prefix configured
         #
         ns_pg1 = (Ether(dst=in6_getnsmac(nsma), src=self.pg1.remote_mac) /
-                  IPv6(dst=d, src=self.pg0._remote_hosts[2].ip6) /
+                  IPv6(dst=d,
+                       src=self.pg0._remote_hosts[2].ip6) /
                   ICMPv6ND_NS(tgt=self.pg0.local_ip6) /
-                  ICMPv6NDOptSrcLLAddr(lladdr=self.pg0._remote_hosts[2].mac))
+                  ICMPv6NDOptSrcLLAddr(
+                      lladdr=self.pg0._remote_hosts[2].mac))
 
         self.send_and_assert_no_replies(self.pg1, ns_pg1, "Off link NS")
 
@@ -1335,7 +1373,7 @@
         t = (Ether(dst=self.pg0.local_mac, src=self.pg0.remote_mac) /
              IPv6(dst=self.pg0._remote_hosts[2].ip6,
                   src=self.pg0.remote_ip6) /
-             UDP(sport=10000, dport=20000) /
+             inet6.UDP(sport=10000, dport=20000) /
              Raw('\xa5' * 100))
 
         self.pg0.add_stream(t)
@@ -1347,16 +1385,20 @@
         self.assertEqual(rx[Ether].dst, self.pg0._remote_hosts[2].mac)
         self.assertEqual(rx[Ether].src, self.pg1.local_mac)
 
-        self.assertEqual(rx[IPv6].src, t[IPv6].src)
-        self.assertEqual(rx[IPv6].dst, t[IPv6].dst)
+        self.assertEqual(rx[IPv6].src,
+                         t[IPv6].src)
+        self.assertEqual(rx[IPv6].dst,
+                         t[IPv6].dst)
 
         #
         # Test we proxy for the host on the main interface
         #
         ns_pg0 = (Ether(dst=in6_getnsmac(nsma), src=self.pg0.remote_mac) /
                   IPv6(dst=d, src=self.pg0.remote_ip6) /
-                  ICMPv6ND_NS(tgt=self.pg0._remote_hosts[2].ip6) /
-                  ICMPv6NDOptSrcLLAddr(lladdr=self.pg0.remote_mac))
+                  ICMPv6ND_NS(
+                      tgt=self.pg0._remote_hosts[2].ip6) /
+                  ICMPv6NDOptSrcLLAddr(
+                      lladdr=self.pg0.remote_mac))
 
         self.send_and_expect_na(self.pg0, ns_pg0,
                                 "NS to proxy entry on main",
@@ -1367,9 +1409,11 @@
         # Setup and resolve proxy for another host on another interface
         #
         ns_pg2 = (Ether(dst=in6_getnsmac(nsma), src=self.pg2.remote_mac) /
-                  IPv6(dst=d, src=self.pg0._remote_hosts[3].ip6) /
+                  IPv6(dst=d,
+                       src=self.pg0._remote_hosts[3].ip6) /
                   ICMPv6ND_NS(tgt=self.pg0.local_ip6) /
-                  ICMPv6NDOptSrcLLAddr(lladdr=self.pg0._remote_hosts[2].mac))
+                  ICMPv6NDOptSrcLLAddr(
+                      lladdr=self.pg0._remote_hosts[2].mac))
 
         self.vapi.ip6_nd_proxy(
             inet_pton(AF_INET6, self.pg0._remote_hosts[3].ip6),
@@ -1392,7 +1436,7 @@
                     src=self.pg0.remote_hosts[3].mac) /
               IPv6(dst=self.pg0._remote_hosts[2].ip6,
                    src=self.pg0._remote_hosts[3].ip6) /
-              UDP(sport=10000, dport=20000) /
+              inet6.UDP(sport=10000, dport=20000) /
               Raw('\xa5' * 100))
 
         self.pg2.add_stream(t2)
@@ -1404,8 +1448,10 @@
         self.assertEqual(rx[Ether].dst, self.pg0._remote_hosts[2].mac)
         self.assertEqual(rx[Ether].src, self.pg1.local_mac)
 
-        self.assertEqual(rx[IPv6].src, t2[IPv6].src)
-        self.assertEqual(rx[IPv6].dst, t2[IPv6].dst)
+        self.assertEqual(rx[IPv6].src,
+                         t2[IPv6].src)
+        self.assertEqual(rx[IPv6].dst,
+                         t2[IPv6].dst)
 
         #
         # remove the proxy configs
@@ -1474,7 +1520,7 @@
         p = (Ether(src=self.pg0.remote_mac,
                    dst=self.pg0.local_mac) /
              IPv6(src=self.pg0.remote_ip6, dst="2001::1") /
-             UDP(sport=1234, dport=1234) /
+             inet6.UDP(sport=1234, dport=1234) /
              Raw('\xa5' * 100))
 
         #
@@ -1561,12 +1607,12 @@
         pu = (Ether(src=self.pg1.remote_mac,
                     dst=self.pg1.local_mac) /
               IPv6(src="2001::1", dst=self.pg0.remote_ip6) /
-              UDP(sport=1234, dport=1234) /
+              inet6.UDP(sport=1234, dport=1234) /
               Raw('\xa5' * 100))
         pm = (Ether(src=self.pg1.remote_mac,
                     dst=self.pg1.local_mac) /
               IPv6(src="2001::1", dst="ffef::1") /
-              UDP(sport=1234, dport=1234) /
+              inet6.UDP(sport=1234, dport=1234) /
               Raw('\xa5' * 100))
 
         #
@@ -1667,9 +1713,10 @@
         src_mpls_pkts = []
 
         for ii in range(65):
-            port_ip_hdr = (IPv6(dst="3000::1", src="3000:1::1") /
-                           UDP(sport=1234, dport=1234 + ii) /
-                           Raw('\xa5' * 100))
+            port_ip_hdr = (
+                IPv6(dst="3000::1", src="3000:1::1") /
+                inet6.UDP(sport=1234, dport=1234 + ii) /
+                Raw('\xa5' * 100))
             port_ip_pkts.append((Ether(src=self.pg0.remote_mac,
                                        dst=self.pg0.local_mac) /
                                  port_ip_hdr))
@@ -1688,9 +1735,10 @@
                                   MPLS(label=14, ttl=2) /
                                   MPLS(label=999, ttl=2) /
                                   port_ip_hdr))
-            src_ip_hdr = (IPv6(dst="3000::1", src="3000:1::%d" % ii) /
-                          UDP(sport=1234, dport=1234) /
-                          Raw('\xa5' * 100))
+            src_ip_hdr = (
+                IPv6(dst="3000::1", src="3000:1::%d" % ii) /
+                inet6.UDP(sport=1234, dport=1234) /
+                Raw('\xa5' * 100))
             src_ip_pkts.append((Ether(src=self.pg0.remote_mac,
                                       dst=self.pg0.local_mac) /
                                 src_ip_hdr))
@@ -1787,13 +1835,16 @@
         for ii in range(257):
             port_pkts.append((Ether(src=self.pg0.remote_mac,
                                     dst=self.pg0.local_mac) /
-                              IPv6(dst="4000::1", src="4000:1::1") /
-                              UDP(sport=1234, dport=1234 + ii) /
+                              IPv6(dst="4000::1",
+                                   src="4000:1::1") /
+                              inet6.UDP(sport=1234,
+                                        dport=1234 + ii) /
                               Raw('\xa5' * 100)))
             src_pkts.append((Ether(src=self.pg0.remote_mac,
                                    dst=self.pg0.local_mac) /
-                             IPv6(dst="4000::1", src="4000:1::%d" % ii) /
-                             UDP(sport=1234, dport=1234) /
+                             IPv6(dst="4000::1",
+                                  src="4000:1::%d" % ii) /
+                             inet6.UDP(sport=1234, dport=1234) /
                              Raw('\xa5' * 100)))
 
         route_3000_2 = VppIpRoute(self, "3000::2", 128,
@@ -1836,8 +1887,10 @@
         for ii in range(257):
             port_pkts.append((Ether(src=self.pg0.remote_mac,
                                     dst=self.pg0.local_mac) /
-                              IPv6(dst="6000::1", src="6000:1::1") /
-                              UDP(sport=1234, dport=1234 + ii) /
+                              IPv6(dst="6000::1",
+                                   src="6000:1::1") /
+                              inet6.UDP(sport=1234,
+                                        dport=1234 + ii) /
                               Raw('\xa5' * 100)))
 
         route_5000_2 = VppIpRoute(self, "5000::2", 128,
@@ -1885,8 +1938,9 @@
 
         p = (Ether(src=self.pg0.remote_mac,
                    dst=self.pg0.local_mac) /
-             IPv6(src=self.pg0.remote_ip6, dst=self.pg0.local_ip6) /
-             TCP(sport=1234, dport=1234) /
+             IPv6(src=self.pg0.remote_ip6,
+                  dst=self.pg0.local_ip6) /
+             inet6.TCP(sport=1234, dport=1234) /
              Raw('\xa5' * 100))
 
         pkts = p * 1025
@@ -2047,12 +2101,12 @@
         p_dst = (Ether(src=self.pg0.remote_mac,
                        dst=self.pg0.local_mac) /
                  IPv6(src="5::5", dst="1::1") /
-                 TCP(sport=1234, dport=1234) /
+                 inet6.TCP(sport=1234, dport=1234) /
                  Raw('\xa5' * 100))
         p_src = (Ether(src=self.pg0.remote_mac,
                        dst=self.pg0.local_mac) /
                  IPv6(src="2::2", dst="1::2") /
-                 TCP(sport=1234, dport=1234) /
+                 inet6.TCP(sport=1234, dport=1234) /
                  Raw('\xa5' * 100))
         pkts_dst = p_dst * 257
         pkts_src = p_src * 257
@@ -2100,7 +2154,7 @@
         p_l = (Ether(src=self.pg0.remote_mac,
                      dst=self.pg0.local_mac) /
                IPv6(src="3::4", dst="3::3") /
-               TCP(sport=1234, dport=1234) /
+               inet6.TCP(sport=1234, dport=1234) /
                Raw('\xa5' * 100))
 
         self.send_and_assert_no_replies(self.pg0, p_l * 257,
@@ -2137,7 +2191,7 @@
                      IPv6(src=self.pg0.remote_ip6,
                           dst=self.pg1.remote_ip6,
                           version=3) /
-                     UDP(sport=1234, dport=1234) /
+                     inet6.UDP(sport=1234, dport=1234) /
                      Raw('\xa5' * 100))
 
         self.send_and_assert_no_replies(self.pg0, p_version * 65,
@@ -2151,7 +2205,7 @@
                      IPv6(src=self.pg0.remote_ip6,
                           dst=self.pg1.remote_ip6,
                           hlim=1) /
-                     UDP(sport=1234, dport=1234) /
+                     inet6.UDP(sport=1234, dport=1234) /
                      Raw('\xa5' * 100))
 
         rx = self.send_and_expect(self.pg0, p_version * 65, self.pg0)
diff --git a/test/test_nat.py b/test/test_nat.py
index b7b80c9..c03cf08 100644
--- a/test/test_nat.py
+++ b/test/test_nat.py
@@ -10,12 +10,11 @@
 from scapy.layers.inet import IP, TCP, UDP, ICMP
 from scapy.layers.inet import IPerror, TCPerror, UDPerror, ICMPerror
 from scapy.layers.inet6 import IPv6, ICMPv6EchoRequest, ICMPv6EchoReply, \
-    ICMPv6ND_NS, ICMPv6ND_NA, ICMPv6NDOptDstLLAddr
+    ICMPv6ND_NS, ICMPv6ND_NA, ICMPv6NDOptDstLLAddr, fragment6
 from scapy.layers.inet6 import ICMPv6DestUnreach, IPerror6, IPv6ExtHdrFragment
 from scapy.layers.l2 import Ether, ARP, GRE
 from scapy.data import IP_PROTOS
 from scapy.packet import bind_layers, Raw
-from scapy.all import fragment6
 from util import ppp
 from ipfix import IPFIX, Set, Template, Data, IPFIXDecoder
 from time import sleep
@@ -579,7 +578,7 @@
         for packet in capture:
             try:
                 self.assertEqual(packet[IP].src, src_ip)
-                self.assertTrue(packet.haslayer(ICMP))
+                self.assertEqual(packet.haslayer(ICMP), 1)
                 icmp = packet[ICMP]
                 self.assertEqual(icmp.type, icmp_type)
                 self.assertTrue(icmp.haslayer(IPerror))
@@ -609,7 +608,7 @@
         for packet in capture:
             try:
                 self.assertEqual(packet[IP].dst, in_if.remote_ip4)
-                self.assertTrue(packet.haslayer(ICMP))
+                self.assertEqual(packet.haslayer(ICMP), 1)
                 icmp = packet[ICMP]
                 self.assertEqual(icmp.type, icmp_type)
                 self.assertTrue(icmp.haslayer(IPerror))
@@ -3073,7 +3072,7 @@
         try:
             self.assertEqual(packet[IP].src, nat_ip)
             self.assertEqual(packet[IP].dst, self.pg1.remote_ip4)
-            self.assertTrue(packet.haslayer(GRE))
+            self.assertEqual(packet.haslayer(GRE), 1)
             self.assert_packet_checksums_valid(packet)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
@@ -3093,7 +3092,7 @@
         try:
             self.assertEqual(packet[IP].src, self.pg1.remote_ip4)
             self.assertEqual(packet[IP].dst, self.pg0.remote_ip4)
-            self.assertTrue(packet.haslayer(GRE))
+            self.assertEqual(packet.haslayer(GRE), 1)
             self.assert_packet_checksums_valid(packet)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
@@ -3128,7 +3127,7 @@
         try:
             self.assertEqual(packet[IP].src, host_nat_ip)
             self.assertEqual(packet[IP].dst, server.ip4)
-            self.assertTrue(packet.haslayer(GRE))
+            self.assertEqual(packet.haslayer(GRE), 1)
             self.assert_packet_checksums_valid(packet)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
@@ -3148,7 +3147,7 @@
         try:
             self.assertEqual(packet[IP].src, server_nat_ip)
             self.assertEqual(packet[IP].dst, host.ip4)
-            self.assertTrue(packet.haslayer(GRE))
+            self.assertEqual(packet.haslayer(GRE), 1)
             self.assert_packet_checksums_valid(packet)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
@@ -4428,7 +4427,7 @@
         try:
             self.assertEqual(packet[IP].src, self.nat_addr)
             self.assertEqual(packet[IP].dst, self.pg1.remote_ip4)
-            self.assertTrue(packet.haslayer(GRE))
+            self.assertEqual(packet.haslayer(GRE), 1)
             self.assert_packet_checksums_valid(packet)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
@@ -4448,7 +4447,7 @@
         try:
             self.assertEqual(packet[IP].src, self.pg1.remote_ip4)
             self.assertEqual(packet[IP].dst, self.pg0.remote_ip4)
-            self.assertTrue(packet.haslayer(GRE))
+            self.assertEqual(packet.haslayer(GRE), 1)
             self.assert_packet_checksums_valid(packet)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
@@ -4492,7 +4491,7 @@
         try:
             self.assertEqual(packet[IP].src, self.nat_addr)
             self.assertEqual(packet[IP].dst, server.ip4)
-            self.assertTrue(packet.haslayer(GRE))
+            self.assertEqual(packet.haslayer(GRE), 1)
             self.assert_packet_checksums_valid(packet)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
@@ -4512,7 +4511,7 @@
         try:
             self.assertEqual(packet[IP].src, server_nat_ip)
             self.assertEqual(packet[IP].dst, host.ip4)
-            self.assertTrue(packet.haslayer(GRE))
+            self.assertEqual(packet.haslayer(GRE), 1)
             self.assert_packet_checksums_valid(packet)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
@@ -6693,7 +6692,7 @@
         packet = capture[0]
         try:
             self.assertEqual(packet[IPv6].src, self.pg5.local_ip6)
-            self.assertTrue(packet.haslayer(ICMPv6ND_NS))
+            self.assertEqual(packet.haslayer(ICMPv6ND_NS), 1)
             tgt = packet[ICMPv6ND_NS].tgt
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
@@ -6721,7 +6720,7 @@
         try:
             self.assertEqual(packet[IPv6].src, self.pg5.local_ip6)
             self.assertEqual(packet[IPv6].dst, self.pg5.remote_ip6)
-            self.assertTrue(packet.haslayer(ICMPv6EchoReply))
+            self.assertEqual(packet.haslayer(ICMPv6EchoReply), 1)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
             raise
@@ -7300,7 +7299,7 @@
         try:
             self.assertEqual(packet[IP].src, self.nat_addr)
             self.assertEqual(packet[IP].dst, self.pg1.remote_ip4)
-            self.assertTrue(packet.haslayer(GRE))
+            self.assertEqual(packet.haslayer(GRE), 1)
             self.assert_packet_checksums_valid(packet)
         except:
             self.logger.error(ppp("Unexpected or invalid packet:", packet))
