Tests Cleanup: Fix missing calls to setUpClass/tearDownClass.
[vpp.git] / test / test_bihash.py
1 #!/usr/bin/env python
2
3 import unittest
4
5 from framework import VppTestCase, VppTestRunner
6 from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
7
8
9 class TestBihash(VppTestCase):
10     """ Bihash Test Cases """
11
12     @classmethod
13     def setUpClass(cls):
14         super(TestBihash, cls).setUpClass()
15
16     @classmethod
17     def tearDownClass(cls):
18         super(TestBihash, cls).tearDownClass()
19
20     def setUp(self):
21         super(TestBihash, self).setUp()
22
23     def tearDown(self):
24         super(TestBihash, self).tearDown()
25
26     def test_bihash_unittest(self):
27         """ Bihash Add/Del Test """
28         error = self.vapi.cli("test bihash ")
29
30         if error:
31             self.logger.critical(error)
32             self.assertNotIn('failed', error)
33
34     def test_bihash_thread(self):
35         """ Bihash Thread Test """
36
37         error = self.vapi.cli("test bihash threads 2 nbuckets 64000")
38
39         if error:
40             self.logger.critical(error)
41             self.assertNotIn('failed', error)
42
43 if __name__ == '__main__':
44     unittest.main(testRunner=VppTestRunner)