From 026a9bfaa656d0e5ade327feda64f17796d6f209 Mon Sep 17 00:00:00 2001 From: Valentin Boucher Date: Thu, 19 Jul 2018 11:35:50 -0400 Subject: New Heat IMS testcase In order to validate OpenStack Master deployment we create this new testcase using OpenStack Heat as an Orchestrator for Clearwater VNF JIRA: FUNCTEST-995 Change-Id: I8b7b74a3753c2d4d4614e9a2798283bd3f99d5d2 Signed-off-by: Valentin Boucher --- functest/tests/unit/vnf/ims/test_clearwater.py | 42 ++++++++++++++++++++++++++ functest/tests/unit/vnf/ims/test_ims_base.py | 42 -------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 functest/tests/unit/vnf/ims/test_clearwater.py delete mode 100644 functest/tests/unit/vnf/ims/test_ims_base.py (limited to 'functest/tests/unit/vnf') diff --git a/functest/tests/unit/vnf/ims/test_clearwater.py b/functest/tests/unit/vnf/ims/test_clearwater.py new file mode 100644 index 000000000..93f8ffe4a --- /dev/null +++ b/functest/tests/unit/vnf/ims/test_clearwater.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 + +# pylint: disable=missing-docstring + +import logging +import unittest + +import mock + +from functest.opnfv_tests.vnf.ims import clearwater + + +class ClearwaterTesting(unittest.TestCase): + + def setUp(self): + with mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.' + 'os.makedirs'): + self.ims_vnf = clearwater.ClearwaterTesting("foo", "0.0.0.0") + + self.mock_post = mock.Mock() + attrs = {'status_code': 201, + 'cookies': ""} + self.mock_post.configure_mock(**attrs) + + self.mock_post_200 = mock.Mock() + attrs = {'status_code': 200, + 'cookies': ""} + self.mock_post_200.configure_mock(**attrs) + + self.mock_post_500 = mock.Mock() + attrs = {'status_code': 500, + 'cookies': ""} + self.mock_post_200.configure_mock(**attrs) + +if __name__ == "__main__": + logging.disable(logging.CRITICAL) + unittest.main(verbosity=2) diff --git a/functest/tests/unit/vnf/ims/test_ims_base.py b/functest/tests/unit/vnf/ims/test_ims_base.py deleted file mode 100644 index a3f7e2354..000000000 --- a/functest/tests/unit/vnf/ims/test_ims_base.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python - -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 - -# pylint: disable=missing-docstring - -import logging -import unittest - -import mock - -from functest.opnfv_tests.vnf.ims import clearwater_ims_base as ims_base - - -class ClearwaterOnBoardingBaseTesting(unittest.TestCase): - - def setUp(self): - with mock.patch('functest.opnfv_tests.vnf.ims.cloudify_ims.' - 'os.makedirs'): - self.ims_vnf = ims_base.ClearwaterOnBoardingBase("foo") - - self.mock_post = mock.Mock() - attrs = {'status_code': 201, - 'cookies': ""} - self.mock_post.configure_mock(**attrs) - - self.mock_post_200 = mock.Mock() - attrs = {'status_code': 200, - 'cookies': ""} - self.mock_post_200.configure_mock(**attrs) - - self.mock_post_500 = mock.Mock() - attrs = {'status_code': 500, - 'cookies': ""} - self.mock_post_200.configure_mock(**attrs) - -if __name__ == "__main__": - logging.disable(logging.CRITICAL) - unittest.main(verbosity=2) -- cgit 1.2.3-korg