diff options
author | Deepak S <deepak.s@linux.intel.com> | 2017-09-21 22:13:09 -0700 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2017-10-17 08:22:17 -0700 |
commit | e6c924052f12782de6ee79d3b01a2bae4d505f0f (patch) | |
tree | a2083c5088f28343446159413f78b38d5a6933ac /tests/unit/network_services/vnf_generic/vnf | |
parent | c270be42cde9e26018809fef35e401729be77eb1 (diff) |
Enable static cgnapt functionality.
Change-Id: Ie770ca69ebdc66589ed6ca5c25bfc9a75afb8938
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'tests/unit/network_services/vnf_generic/vnf')
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py | 7 | ||||
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py | 9 |
2 files changed, 3 insertions, 13 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py index b0ef1da91..832509ea7 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py @@ -72,13 +72,12 @@ link 1 up self.assertNotIn("This is a header", out) def test__get_cgnapt_config(self): - vnfd_helper = mock.Mock() + vnfd_helper = mock.MagicMock() vnfd_helper.port_pairs.uplink_ports = [{"name": 'a'}, {"name": "b"}, {"name": "c"}] helper = CgnaptApproxSetupEnvHelper(vnfd_helper, mock.Mock(), mock.Mock()) - helper._get_ports_gateway = mock.Mock(side_effect=[3, 5, 2]) - result = helper._get_cgnapt_config([{"name": 'a'}, {}, {"name": "b"}, {}, {"name": "c"}]) - self.assertEqual(result, [3, 5, 2]) + result = helper._get_cgnapt_config() + self.assertIsNotNone(result) def test_scale(self): helper = CgnaptApproxSetupEnvHelper(mock.Mock(), mock.Mock(), mock.Mock()) diff --git a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py index c41da2c45..6c102ed59 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py @@ -360,15 +360,6 @@ class TestSetupEnvHelper(unittest.TestCase): with self.assertRaises(NotImplementedError): setup_env_helper.build_config() - def test__get_ports_gateway(self): - vnfd_helper = VnfdHelper(self.VNFD_0) - setup_env_helper = SetupEnvHelper(vnfd_helper, mock.Mock(), mock.Mock()) - result = setup_env_helper._get_ports_gateway("xe0") - self.assertEqual(result, "152.16.100.20") - - result = setup_env_helper._get_ports_gateway("xe123") - self.assertIsNone(result) - def test_setup_vnf_environment(self): setup_env_helper = SetupEnvHelper(mock.Mock(), mock.Mock(), mock.Mock()) self.assertIsNone(setup_env_helper.setup_vnf_environment()) |