aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/core/test_vnf.py
diff options
context:
space:
mode:
Diffstat (limited to 'functest/tests/unit/core/test_vnf.py')
-rw-r--r--functest/tests/unit/core/test_vnf.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/functest/tests/unit/core/test_vnf.py b/functest/tests/unit/core/test_vnf.py
index 793e9576..ce859040 100644
--- a/functest/tests/unit/core/test_vnf.py
+++ b/functest/tests/unit/core/test_vnf.py
@@ -21,8 +21,6 @@ from functest.core import testcase
class VnfBaseTesting(unittest.TestCase):
- logging.disable(logging.CRITICAL)
-
def setUp(self):
self.test = vnf.VnfOnBoarding(
project='functest', case_name='aaa')
@@ -148,12 +146,12 @@ class VnfBaseTesting(unittest.TestCase):
def test_deploy_vnf_unimplemented(self):
with self.assertRaises(Exception) as context:
self.test.deploy_vnf()
- self.assertTrue('VNF not deployed' in context.exception)
+ self.assertIn('VNF not deployed', str(context.exception))
def test_test_vnf_unimplemented(self):
with self.assertRaises(Exception) as context:
self.test.test_vnf()()
- self.assertTrue('VNF not tested' in context.exception)
+ self.assertIn('VNF not tested', str(context.exception))
def test_parse_results_ex_ok(self):
self.test.details['test_vnf']['status'] = 'PASS'
@@ -165,4 +163,5 @@ class VnfBaseTesting(unittest.TestCase):
if __name__ == "__main__":
+ logging.disable(logging.CRITICAL)
unittest.main(verbosity=2)