aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/network_services/vnf_generic/vnf
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-09-20 14:42:00 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-20 14:51:41 -0700
commit8ae5b0611c32d5dd34619edd8af553ae7633740d (patch)
tree58ffa1a89a6215035c2965437cfb05942090dcca /tests/unit/network_services/vnf_generic/vnf
parentd374dc8ca09e7d6e08a531e68a21a8b107af21d0 (diff)
cgnapt: mock time.sleep in unitests
Change-Id: I26957977e6dcd0392078a543a6907a550711c702 Signed-off-by: Ross Brattain <ross.b.brattain@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.py6
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]