3 # Copyright (c) 2016 Orange and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
13 from functest.core import vnf
16 class VnfBaseTesting(unittest.TestCase):
18 logging.disable(logging.CRITICAL)
21 self.test = vnf.VnfOnBoarding(project='functest',
23 self.test.project = "functest"
24 self.test.start_time = "1"
25 self.test.stop_time = "5"
27 self.test.details = {"orchestrator": {"status": "PASS",
30 "vnf": {"status": "PASS",
33 "test_vnf": {"status": "FAIL",
37 def test_deploy_vnf_unimplemented(self):
38 with self.assertRaises(Exception) as context:
39 self.test.deploy_vnf()
40 self.assertTrue('VNF not deployed' in context.exception)
42 def test_test_vnf_unimplemented(self):
43 with self.assertRaises(Exception) as context:
44 self.test.test_vnf()()
45 self.assertTrue('VNF not tested' in context.exception)
47 def test_parse_results(self):
48 self.assertNotEqual(self.test.parse_results(), 0)
51 if __name__ == "__main__":
52 unittest.main(verbosity=2)