| """CLI functional tests""" |
| from framework import VppTestCase, VppTestRunner |
| class TestCLI(VppTestCase): |
| super(TestCLI, cls).setUpClass() |
| super(TestCLI, cls).tearDownClass() |
| super(TestCLI, self).setUp() |
| super(TestCLI, self).tearDown() |
| def test_cli_retval(self): |
| """ CLI inband retval """ |
| rv = self.vapi.papi.cli_inband(cmd='this command does not exist') |
| self.assertNotEqual(rv.retval, 0) |
| rv = self.vapi.papi.cli_inband(cmd='show version') |
| self.assertEqual(rv.retval, 0) |
| if __name__ == '__main__': |
| unittest.main(testRunner=VppTestRunner) |