diff options
author | 2017-09-27 20:59:34 +0000 | |
---|---|---|
committer | 2017-09-27 20:59:34 +0000 | |
commit | 804a541be394f794047a55091c9378c605e9e7ec (patch) | |
tree | d44218e7ee5a07fb52caa290b6aae0298710764c /tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py | |
parent | bd33c3fee8d285dba5f190de0af2eb62ba7f04b2 (diff) | |
parent | bd11ffdec1f18785696b5c4872e5bd5e1012249c (diff) |
Merge "collectd: write config file from Jinja2 template"
Diffstat (limited to 'tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py')
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py | 10 |
1 files changed, 8 insertions, 2 deletions
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 4b9f4172e..d0c4b6f42 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 @@ -723,8 +723,9 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): result = dpdk_setup_helper._validate_cpu_cfg() self.assertEqual(result, expected) + @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time') @mock.patch('yardstick.ssh.SSH') - def test_setup_vnf_environment(self, _): + def test_setup_vnf_environment(self, _, mock_time): def execute(cmd, *args, **kwargs): if cmd.startswith('which '): return exec_failure @@ -782,6 +783,8 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) dpdk_setup_helper._validate_cpu_cfg = mock.Mock() + dpdk_setup_helper.bound_pci = [v['virtual-interface']["vpci"] for v in + vnfd_helper.interfaces] result = dpdk_setup_helper._setup_resources() self.assertIsInstance(result, ResourceProfile) self.assertEqual(dpdk_setup_helper.socket, 0) @@ -796,11 +799,14 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) dpdk_setup_helper._validate_cpu_cfg = mock.Mock() + dpdk_setup_helper.bound_pci = [v['virtual-interface']["vpci"] for v in + vnfd_helper.interfaces] result = dpdk_setup_helper._setup_resources() self.assertIsInstance(result, ResourceProfile) self.assertEqual(dpdk_setup_helper.socket, 1) - def test__detect_and_bind_drivers(self): + @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time') + def test__detect_and_bind_drivers(self, mock_time): vnfd_helper = VnfdHelper(deepcopy(self.VNFD_0)) ssh_helper = mock.Mock() # ssh_helper.execute = mock.Mock(return_value = (0, 'text', '')) |