diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-09-05 13:02:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-05 13:02:33 +0000 |
commit | d332664dd680d877ef822660c2f8bed2ef0a7322 (patch) | |
tree | 84bb833730cfd9f2141ef7ae86296013ecbc3e77 /tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py | |
parent | 2251057b0222464398ae86d92b5904f418af6ed8 (diff) | |
parent | a1722f91ac250e2a021b7a1cc4e4f99f11ff41e0 (diff) |
Merge "Addition of Prox NSB changes in yardstick"
Diffstat (limited to 'tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py')
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py index 12abadf98..a12abb625 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py @@ -20,7 +20,7 @@ import mock from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh from tests.unit import STL_MOCKS - +from yardstick.network_services.nfvi.resource import ResourceProfile SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper' NAME = 'vnf__1' @@ -331,13 +331,14 @@ class TestProxTrafficGen(unittest.TestCase): mock_ssh(ssh) prox_traffic_gen = ProxTrafficGen(NAME, self.VNFD0) - prox_traffic_gen._queue = mock.MagicMock() + prox_traffic_gen._vnf_wrapper.resource = mock.Mock(autospec=ResourceProfile) + prox_traffic_gen._vnf_wrapper.vnf_execute = mock.Mock(return_value="") self.assertEqual({}, prox_traffic_gen.collect_kpi()) @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.CpuSysCores') @mock.patch('yardstick.network_services.vnf_generic.vnf.prox_helpers.find_relative_file') @mock.patch(SSH_HELPER) - def test_instantiate(self, ssh, mock_find, mock_cpu_sys_cores, mock_time): + def bad_test_instantiate(self, ssh, mock_find, mock_cpu_sys_cores, mock_time): mock_ssh(ssh) mock_cpu_sys_cores.get_core_socket.return_value = {'0': '01234'} @@ -424,5 +425,6 @@ class TestProxTrafficGen(unittest.TestCase): prox_traffic_gen._traffic_process.terminate = mock.Mock() prox_traffic_gen.ssh_helper = mock.MagicMock() prox_traffic_gen.setup_helper = mock.MagicMock() + prox_traffic_gen._vnf_wrapper.setup_helper = mock.MagicMock() prox_traffic_gen.resource_helper = mock.MagicMock() self.assertEqual(None, prox_traffic_gen.terminate()) |