From bdad6faa1fafe7cd20ea96aa70a52178d62add63 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Mon, 27 Aug 2018 18:11:11 +0200 Subject: Decouple tacker from tests Support n-sfc too and abstract a bit the MANO layer so that other MANO components can be inserted into the test Change-Id: I3fb59fbf40b4207bf1721092cd8ff0559e1d9d90 Signed-off-by: Manuel Buil --- sfc/unit_tests/unit/lib/test_odl_utils.py | 40 ------------------------------- 1 file changed, 40 deletions(-) (limited to 'sfc/unit_tests/unit/lib/test_odl_utils.py') diff --git a/sfc/unit_tests/unit/lib/test_odl_utils.py b/sfc/unit_tests/unit/lib/test_odl_utils.py index d151a1ca..17ad88f5 100644 --- a/sfc/unit_tests/unit/lib/test_odl_utils.py +++ b/sfc/unit_tests/unit/lib/test_odl_utils.py @@ -733,43 +733,3 @@ class SfcOdlUtilsTesting(unittest.TestCase): 'compute_nodes') assert mock_sleep.call_count == 2 mock_log.assert_not_called() - - @patch('os.path.join', autospec=True) - @patch('sfc.lib.odl_utils.os_sfc_utils.create_vnffg_with_param_file', - autospec=True) - @patch('sfc.lib.odl_utils.os_sfc_utils.create_vnffgd', autospec=True) - def test_create_chain(self, mock_create_vnffgd, - mock_create_vnffg_with_param_file, - mock_join): - """ - Checks the proper functionality of create_chain - function - """ - - mock_join.return_value = '/tosca_file' - mock_neutron = Mock() - mock_common_config = Mock() - mock_testcase_config = Mock() - mock_common_config.vnffgd_dir = 'mock_vnffgd_dir' - mock_common_config.sfc_test_dir = 'mock_sfc_test_dir' - mock_testcase_config.test_vnffgd_red = 'mock_test_vnffgd_red' - mock_neutron.id = 'mock_id' - - odl_utils.create_chain('tacker_client', - 'default_param_file', - mock_neutron, - mock_common_config, - mock_testcase_config) - - mock_join.assert_called_once_with('mock_sfc_test_dir', - 'mock_vnffgd_dir', - 'mock_test_vnffgd_red') - mock_create_vnffgd.assert_called_once_with('tacker_client', - tosca_file='/tosca_file', - vnffgd_name='red') - mock_create_vnffg_with_param_file.assert_called_once_with( - 'tacker_client', - 'red', - 'red_http', - 'default_param_file', - 'mock_id') -- cgit 1.2.3-korg