diff --git a/test/test_classifier_ip6.py b/test/test_classifier_ip6.py
index 211374b..7b5d41c 100644
--- a/test/test_classifier_ip6.py
+++ b/test/test_classifier_ip6.py
@@ -14,7 +14,7 @@
 
 
 class TestClassifierIP6(TestClassifier):
-    """ Classifier IP6 Test Case """
+    """Classifier IP6 Test Case"""
 
     @classmethod
     def setUpClass(cls):
@@ -26,7 +26,7 @@
         super(TestClassifierIP6, cls).tearDownClass()
 
     def test_iacl_src_ip(self):
-        """ Source IP6 iACL test
+        """Source IP6 iACL test
 
         Test scenario for basic IP ACL with source IP
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -38,13 +38,13 @@
         pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes)
         self.pg0.add_stream(pkts)
 
-        key = 'ip6_src'
+        key = "ip6_src"
         self.create_classify_table(
-            key,
-            self.build_ip6_mask(src_ip='ffffffffffffffffffffffffffffffff'))
+            key, self.build_ip6_mask(src_ip="ffffffffffffffffffffffffffffffff")
+        )
         self.create_classify_session(
-            self.acl_tbl_idx.get(key),
-            self.build_ip6_match(src_ip=self.pg0.remote_ip6))
+            self.acl_tbl_idx.get(key), self.build_ip6_match(src_ip=self.pg0.remote_ip6)
+        )
         self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
@@ -57,7 +57,7 @@
         self.pg2.assert_nothing_captured(remark="packets forwarded")
 
     def test_iacl_dst_ip(self):
-        """ Destination IP6 iACL test
+        """Destination IP6 iACL test
 
         Test scenario for basic IP ACL with destination IP
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -69,13 +69,13 @@
         pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes)
         self.pg0.add_stream(pkts)
 
-        key = 'ip6_dst'
+        key = "ip6_dst"
         self.create_classify_table(
-            key,
-            self.build_ip6_mask(dst_ip='ffffffffffffffffffffffffffffffff'))
+            key, self.build_ip6_mask(dst_ip="ffffffffffffffffffffffffffffffff")
+        )
         self.create_classify_session(
-            self.acl_tbl_idx.get(key),
-            self.build_ip6_match(dst_ip=self.pg1.remote_ip6))
+            self.acl_tbl_idx.get(key), self.build_ip6_match(dst_ip=self.pg1.remote_ip6)
+        )
         self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
@@ -88,7 +88,7 @@
         self.pg2.assert_nothing_captured(remark="packets forwarded")
 
     def test_iacl_src_dst_ip(self):
-        """ Source and destination IP6 iACL test
+        """Source and destination IP6 iACL test
 
         Test scenario for basic IP ACL with source and destination IP
             - Create IPv4 stream for pg0 -> pg1 interface.
@@ -100,15 +100,20 @@
         pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes)
         self.pg0.add_stream(pkts)
 
-        key = 'ip6'
+        key = "ip6"
         self.create_classify_table(
             key,
-            self.build_ip6_mask(src_ip='ffffffffffffffffffffffffffffffff',
-                                dst_ip='ffffffffffffffffffffffffffffffff'))
+            self.build_ip6_mask(
+                src_ip="ffffffffffffffffffffffffffffffff",
+                dst_ip="ffffffffffffffffffffffffffffffff",
+            ),
+        )
         self.create_classify_session(
             self.acl_tbl_idx.get(key),
-            self.build_ip6_match(src_ip=self.pg0.remote_ip6,
-                                 dst_ip=self.pg1.remote_ip6))
+            self.build_ip6_match(
+                src_ip=self.pg0.remote_ip6, dst_ip=self.pg1.remote_ip6
+            ),
+        )
         self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
@@ -124,7 +129,7 @@
 # Tests split to different test case classes because of issue reported in
 # ticket VPP-1336
 class TestClassifierIP6UDP(TestClassifier):
-    """ Classifier IP6 UDP proto Test Case """
+    """Classifier IP6 UDP proto Test Case"""
 
     @classmethod
     def setUpClass(cls):
@@ -132,7 +137,7 @@
         cls.af = socket.AF_INET6
 
     def test_iacl_proto_udp(self):
-        """ IP6 UDP protocol iACL test
+        """IP6 UDP protocol iACL test
 
         Test scenario for basic protocol ACL with UDP protocol
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -144,11 +149,11 @@
         pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes)
         self.pg0.add_stream(pkts)
 
-        key = 'nh_udp'
-        self.create_classify_table(key, self.build_ip6_mask(nh='ff'))
+        key = "nh_udp"
+        self.create_classify_table(key, self.build_ip6_mask(nh="ff"))
         self.create_classify_session(
-            self.acl_tbl_idx.get(key),
-            self.build_ip6_match(nh=socket.IPPROTO_UDP))
+            self.acl_tbl_idx.get(key), self.build_ip6_match(nh=socket.IPPROTO_UDP)
+        )
         self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
@@ -161,7 +166,7 @@
         self.pg2.assert_nothing_captured(remark="packets forwarded")
 
     def test_iacl_proto_udp_sport(self):
-        """ IP6 UDP source port iACL test
+        """IP6 UDP source port iACL test
 
         Test scenario for basic protocol ACL with UDP and sport
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -171,18 +176,18 @@
 
         # Basic iACL testing with UDP and sport
         sport = 38
-        pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes,
-                                  UDP(sport=sport, dport=5678))
+        pkts = self.create_stream(
+            self.pg0, self.pg1, self.pg_if_packet_sizes, UDP(sport=sport, dport=5678)
+        )
         self.pg0.add_stream(pkts)
 
-        key = 'nh_udp_sport'
-        self.create_classify_table(
-            key, self.build_ip6_mask(nh='ff', src_port='ffff'))
+        key = "nh_udp_sport"
+        self.create_classify_table(key, self.build_ip6_mask(nh="ff", src_port="ffff"))
         self.create_classify_session(
             self.acl_tbl_idx.get(key),
-            self.build_ip6_match(nh=socket.IPPROTO_UDP, src_port=sport))
-        self.input_acl_set_interface(
-            self.pg0, self.acl_tbl_idx.get(key))
+            self.build_ip6_match(nh=socket.IPPROTO_UDP, src_port=sport),
+        )
+        self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
         self.pg_enable_capture(self.pg_interfaces)
@@ -194,7 +199,7 @@
         self.pg2.assert_nothing_captured(remark="packets forwarded")
 
     def test_iacl_proto_udp_dport(self):
-        """ IP6 UDP destination port iACL test
+        """IP6 UDP destination port iACL test
 
         Test scenario for basic protocol ACL with UDP and dport
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -204,18 +209,18 @@
 
         # Basic iACL testing with UDP and dport
         dport = 427
-        pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes,
-                                  UDP(sport=1234, dport=dport))
+        pkts = self.create_stream(
+            self.pg0, self.pg1, self.pg_if_packet_sizes, UDP(sport=1234, dport=dport)
+        )
         self.pg0.add_stream(pkts)
 
-        key = 'nh_udp_dport'
-        self.create_classify_table(
-            key, self.build_ip6_mask(nh='ff', dst_port='ffff'))
+        key = "nh_udp_dport"
+        self.create_classify_table(key, self.build_ip6_mask(nh="ff", dst_port="ffff"))
         self.create_classify_session(
             self.acl_tbl_idx.get(key),
-            self.build_ip6_match(nh=socket.IPPROTO_UDP, dst_port=dport))
-        self.input_acl_set_interface(
-            self.pg0, self.acl_tbl_idx.get(key))
+            self.build_ip6_match(nh=socket.IPPROTO_UDP, dst_port=dport),
+        )
+        self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
         self.pg_enable_capture(self.pg_interfaces)
@@ -227,7 +232,7 @@
         self.pg2.assert_nothing_captured(remark="packets forwarded")
 
     def test_iacl_proto_udp_sport_dport(self):
-        """ IP6 UDP source and destination ports iACL test
+        """IP6 UDP source and destination ports iACL test
 
         Test scenario for basic protocol ACL with UDP and sport and dport
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -238,20 +243,20 @@
         # Basic iACL testing with UDP and sport and dport
         sport = 13720
         dport = 9080
-        pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes,
-                                  UDP(sport=sport, dport=dport))
+        pkts = self.create_stream(
+            self.pg0, self.pg1, self.pg_if_packet_sizes, UDP(sport=sport, dport=dport)
+        )
         self.pg0.add_stream(pkts)
 
-        key = 'nh_udp_ports'
+        key = "nh_udp_ports"
         self.create_classify_table(
-            key,
-            self.build_ip6_mask(nh='ff', src_port='ffff', dst_port='ffff'))
+            key, self.build_ip6_mask(nh="ff", src_port="ffff", dst_port="ffff")
+        )
         self.create_classify_session(
             self.acl_tbl_idx.get(key),
-            self.build_ip6_match(nh=socket.IPPROTO_UDP, src_port=sport,
-                                 dst_port=dport))
-        self.input_acl_set_interface(
-            self.pg0, self.acl_tbl_idx.get(key))
+            self.build_ip6_match(nh=socket.IPPROTO_UDP, src_port=sport, dst_port=dport),
+        )
+        self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
         self.pg_enable_capture(self.pg_interfaces)
@@ -264,7 +269,7 @@
 
 
 class TestClassifierIP6TCP(TestClassifier):
-    """ Classifier IP6 TCP proto Test Case """
+    """Classifier IP6 TCP proto Test Case"""
 
     @classmethod
     def setUpClass(cls):
@@ -272,7 +277,7 @@
         cls.af = socket.AF_INET6
 
     def test_iacl_proto_tcp(self):
-        """ IP6 TCP protocol iACL test
+        """IP6 TCP protocol iACL test
 
         Test scenario for basic protocol ACL with TCP protocol
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -281,17 +286,17 @@
         """
 
         # Basic iACL testing with TCP protocol
-        pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes,
-                                  TCP(sport=1234, dport=5678))
+        pkts = self.create_stream(
+            self.pg0, self.pg1, self.pg_if_packet_sizes, TCP(sport=1234, dport=5678)
+        )
         self.pg0.add_stream(pkts)
 
-        key = 'nh_tcp'
-        self.create_classify_table(key, self.build_ip6_mask(nh='ff'))
+        key = "nh_tcp"
+        self.create_classify_table(key, self.build_ip6_mask(nh="ff"))
         self.create_classify_session(
-            self.acl_tbl_idx.get(key),
-            self.build_ip6_match(nh=socket.IPPROTO_TCP))
-        self.input_acl_set_interface(
-            self.pg0, self.acl_tbl_idx.get(key))
+            self.acl_tbl_idx.get(key), self.build_ip6_match(nh=socket.IPPROTO_TCP)
+        )
+        self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
         self.pg_enable_capture(self.pg_interfaces)
@@ -303,7 +308,7 @@
         self.pg2.assert_nothing_captured(remark="packets forwarded")
 
     def test_iacl_proto_tcp_sport(self):
-        """ IP6 TCP source port iACL test
+        """IP6 TCP source port iACL test
 
         Test scenario for basic protocol ACL with TCP and sport
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -313,18 +318,18 @@
 
         # Basic iACL testing with TCP and sport
         sport = 38
-        pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes,
-                                  TCP(sport=sport, dport=5678))
+        pkts = self.create_stream(
+            self.pg0, self.pg1, self.pg_if_packet_sizes, TCP(sport=sport, dport=5678)
+        )
         self.pg0.add_stream(pkts)
 
-        key = 'nh_tcp_sport'
-        self.create_classify_table(
-            key, self.build_ip6_mask(nh='ff', src_port='ffff'))
+        key = "nh_tcp_sport"
+        self.create_classify_table(key, self.build_ip6_mask(nh="ff", src_port="ffff"))
         self.create_classify_session(
             self.acl_tbl_idx.get(key),
-            self.build_ip6_match(nh=socket.IPPROTO_TCP, src_port=sport))
-        self.input_acl_set_interface(
-            self.pg0, self.acl_tbl_idx.get(key))
+            self.build_ip6_match(nh=socket.IPPROTO_TCP, src_port=sport),
+        )
+        self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
         self.pg_enable_capture(self.pg_interfaces)
@@ -336,7 +341,7 @@
         self.pg2.assert_nothing_captured(remark="packets forwarded")
 
     def test_iacl_proto_tcp_dport(self):
-        """ IP6 TCP destination port iACL test
+        """IP6 TCP destination port iACL test
 
         Test scenario for basic protocol ACL with TCP and dport
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -346,18 +351,18 @@
 
         # Basic iACL testing with TCP and dport
         dport = 427
-        pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes,
-                                  TCP(sport=1234, dport=dport))
+        pkts = self.create_stream(
+            self.pg0, self.pg1, self.pg_if_packet_sizes, TCP(sport=1234, dport=dport)
+        )
         self.pg0.add_stream(pkts)
 
-        key = 'nh_tcp_dport'
-        self.create_classify_table(
-            key, self.build_ip6_mask(nh='ff', dst_port='ffff'))
+        key = "nh_tcp_dport"
+        self.create_classify_table(key, self.build_ip6_mask(nh="ff", dst_port="ffff"))
         self.create_classify_session(
             self.acl_tbl_idx.get(key),
-            self.build_ip6_match(nh=socket.IPPROTO_TCP, dst_port=dport))
-        self.input_acl_set_interface(
-            self.pg0, self.acl_tbl_idx.get(key))
+            self.build_ip6_match(nh=socket.IPPROTO_TCP, dst_port=dport),
+        )
+        self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
         self.pg_enable_capture(self.pg_interfaces)
@@ -369,7 +374,7 @@
         self.pg2.assert_nothing_captured(remark="packets forwarded")
 
     def test_iacl_proto_tcp_sport_dport(self):
-        """ IP6 TCP source and destination ports iACL test
+        """IP6 TCP source and destination ports iACL test
 
         Test scenario for basic protocol ACL with TCP and sport and dport
             - Create IPv6 stream for pg0 -> pg1 interface.
@@ -380,20 +385,20 @@
         # Basic iACL testing with TCP and sport and dport
         sport = 13720
         dport = 9080
-        pkts = self.create_stream(self.pg0, self.pg1, self.pg_if_packet_sizes,
-                                  TCP(sport=sport, dport=dport))
+        pkts = self.create_stream(
+            self.pg0, self.pg1, self.pg_if_packet_sizes, TCP(sport=sport, dport=dport)
+        )
         self.pg0.add_stream(pkts)
 
-        key = 'nh_tcp_ports'
+        key = "nh_tcp_ports"
         self.create_classify_table(
-            key,
-            self.build_ip6_mask(nh='ff', src_port='ffff', dst_port='ffff'))
+            key, self.build_ip6_mask(nh="ff", src_port="ffff", dst_port="ffff")
+        )
         self.create_classify_session(
             self.acl_tbl_idx.get(key),
-            self.build_ip6_match(nh=socket.IPPROTO_TCP, src_port=sport,
-                                 dst_port=dport))
-        self.input_acl_set_interface(
-            self.pg0, self.acl_tbl_idx.get(key))
+            self.build_ip6_match(nh=socket.IPPROTO_TCP, src_port=sport, dst_port=dport),
+        )
+        self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
         self.pg_enable_capture(self.pg_interfaces)
@@ -406,7 +411,7 @@
 
 
 class TestClassifierIP6Out(TestClassifier):
-    """ Classifier output IP6 Test Case """
+    """Classifier output IP6 Test Case"""
 
     @classmethod
     def setUpClass(cls):
@@ -414,7 +419,7 @@
         cls.af = socket.AF_INET6
 
     def test_acl_ip_out(self):
-        """ Output IP6 ACL test
+        """Output IP6 ACL test
 
         Test scenario for basic IP ACL with source IP
             - Create IPv6 stream for pg1 -> pg0 interface.
@@ -426,16 +431,16 @@
         pkts = self.create_stream(self.pg1, self.pg0, self.pg_if_packet_sizes)
         self.pg1.add_stream(pkts)
 
-        key = 'ip6_out'
+        key = "ip6_out"
         self.create_classify_table(
             key,
-            self.build_ip6_mask(src_ip='ffffffffffffffffffffffffffffffff'),
-            data_offset=0)
+            self.build_ip6_mask(src_ip="ffffffffffffffffffffffffffffffff"),
+            data_offset=0,
+        )
         self.create_classify_session(
-            self.acl_tbl_idx.get(key),
-            self.build_ip6_match(src_ip=self.pg1.remote_ip6))
-        self.output_acl_set_interface(
-            self.pg0, self.acl_tbl_idx.get(key))
+            self.acl_tbl_idx.get(key), self.build_ip6_match(src_ip=self.pg1.remote_ip6)
+        )
+        self.output_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
         self.pg_enable_capture(self.pg_interfaces)
@@ -448,7 +453,7 @@
 
 
 class TestClassifierIP6MAC(TestClassifier):
-    """ Classifier IP6 MAC Test Case """
+    """Classifier IP6 MAC Test Case"""
 
     @classmethod
     def setUpClass(cls):
@@ -456,7 +461,7 @@
         cls.af = socket.AF_INET6
 
     def test_acl_mac(self):
-        """ IP6 MAC iACL test
+        """IP6 MAC iACL test
 
         Test scenario for basic MAC ACL with source MAC
             - Create IPv6 stream for pg0 -> pg2 interface.
@@ -468,12 +473,13 @@
         pkts = self.create_stream(self.pg0, self.pg2, self.pg_if_packet_sizes)
         self.pg0.add_stream(pkts)
 
-        key = 'mac'
+        key = "mac"
         self.create_classify_table(
-            key, self.build_mac_mask(src_mac='ffffffffffff'), data_offset=-14)
+            key, self.build_mac_mask(src_mac="ffffffffffff"), data_offset=-14
+        )
         self.create_classify_session(
-            self.acl_tbl_idx.get(key),
-            self.build_mac_match(src_mac=self.pg0.remote_mac))
+            self.acl_tbl_idx.get(key), self.build_mac_match(src_mac=self.pg0.remote_mac)
+        )
         self.input_acl_set_interface(self.pg0, self.acl_tbl_idx.get(key))
         self.acl_active_table = key
 
@@ -486,5 +492,5 @@
         self.pg1.assert_nothing_captured(remark="packets forwarded")
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     unittest.main(testRunner=VppTestRunner)
