diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2017-09-20 22:24:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-20 22:24:43 +0000 |
commit | 68c26f9b688181928ee5dbe92f95598f49c4e31b (patch) | |
tree | 258bdff14d059892b62999b52efadec434515e67 /tests/unit | |
parent | 6624f127c526ac0010b1482c9280bc2af1d5c2b1 (diff) | |
parent | 8ae5b0611c32d5dd34619edd8af553ae7633740d (diff) |
Merge "cgnapt: mock time.sleep in unitests"
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py | 6 |
1 files changed, 4 insertions, 2 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 76f2d5b5d..0a4c12446 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 @@ -311,8 +311,9 @@ class TestCgnaptApproxVnf(unittest.TestCase): cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) self.assertIsNone(cgnapt_approx_vnf._vnf_process) + @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time') @mock.patch(SSH_HELPER) - def test_collect_kpi(self, ssh, mock_process): + def test_collect_kpi(self, ssh, mock_time, mock_process): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] @@ -324,8 +325,9 @@ class TestCgnaptApproxVnf(unittest.TestCase): result = {'packets_dropped': 0, 'packets_fwd': 0, 'packets_in': 0} self.assertEqual(result, cgnapt_approx_vnf.collect_kpi()) + @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time') @mock.patch(SSH_HELPER) - def test_vnf_execute_command(self, ssh, mock_process): + def test_vnf_execute_command(self, ssh, mock_time, mock_process): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] |