
Many tests use self.assertEqual(error.find("failed"), -1) Use self.assertNotIn("failed", error) to provide more meaningful errors such as AssertionError: 'Failed' not found in '' instead of 0 != -1. Change-Id: I670acdc977b788b2cedf94cfeafc12097781463f Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
21 lines
416 B
Python
21 lines
416 B
Python
#!/usr/bin/env python
|
|
|
|
import unittest
|
|
|
|
from framework import VppTestCase, VppTestRunner
|
|
|
|
|
|
class TestFIB(VppTestCase):
|
|
""" FIB Test Case """
|
|
|
|
def test_fib(self):
|
|
""" FIB Unit Tests """
|
|
error = self.vapi.cli("test fib")
|
|
|
|
if error:
|
|
self.logger.critical(error)
|
|
self.assertNotIn("Failed", error)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main(testRunner=VppTestRunner)
|