Tests: use self.assertNotIn().
[vpp.git] / test / test_bihash.py
index a5cf065..6ccf6c2 100644 (file)
@@ -6,18 +6,18 @@ from framework import VppTestCase, VppTestRunner
 from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
 
 
-class TestTCP(VppTestCase):
+class TestBihash(VppTestCase):
     """ Bihash Test Cases """
 
     @classmethod
     def setUpClass(cls):
-        super(TestTCP, cls).setUpClass()
+        super(TestBihash, cls).setUpClass()
 
     def setUp(self):
-        super(TestTCP, self).setUp()
+        super(TestBihash, self).setUp()
 
     def tearDown(self):
-        super(TestTCP, self).tearDown()
+        super(TestBihash, self).tearDown()
 
     def test_bihash_unittest(self):
         """ Bihash Add/Del Test """
@@ -25,7 +25,7 @@ class TestTCP(VppTestCase):
 
         if error:
             self.logger.critical(error)
-        self.assertEqual(error.find("failed"), -1)
+            self.assertNotIn('failed', error)
 
     def test_bihash_thread(self):
         """ Bihash Thread Test """
@@ -34,7 +34,7 @@ class TestTCP(VppTestCase):
 
         if error:
             self.logger.critical(error)
-            self.assertEqual(error.find("failed"), -1)
+            self.assertNotIn('failed', error)
 
 if __name__ == '__main__':
     unittest.main(testRunner=VppTestRunner)