Florin Coras | 3ea6ce2 | 2017-12-11 09:09:05 -0800 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | import unittest |
| 4 | |
| 5 | from framework import VppTestCase, VppTestRunner |
| 6 | |
| 7 | |
| 8 | class TestSession(VppTestCase): |
| 9 | """ Session Test Case """ |
| 10 | |
| 11 | @classmethod |
| 12 | def setUpClass(cls): |
| 13 | super(TestSession, cls).setUpClass() |
| 14 | |
| 15 | def setUp(self): |
| 16 | super(TestSession, self).setUp() |
| 17 | |
| 18 | def tearDown(self): |
| 19 | super(TestSession, self).tearDown() |
| 20 | self.vapi.session_enable_disable(is_enabled=1) |
| 21 | |
| 22 | def test_session(self): |
| 23 | """ Session Unit Tests """ |
| 24 | error = self.vapi.cli("test session all") |
| 25 | |
| 26 | if error: |
| 27 | self.logger.critical(error) |
| 28 | self.assertEqual(error.find("Failed"), -1) |
| 29 | |
| 30 | if __name__ == '__main__': |
| 31 | unittest.main(testRunner=VppTestRunner) |