summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-07-03 16:24:20 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-07-03 16:24:20 +0000
commit494810c4d113088069d6d2746bb40f988c583ef3 (patch)
tree797212e47da124bdf43fb6b6448703535b17f62b
parent500cb610a59123be519e100681cc02af21f596f2 (diff)
parentd2151e7ce5d6d2a095788e1359a271606b88db21 (diff)
Merge "Cleanup VsperfDPDKTestCase unit tests"
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yardstick/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py b/yardstick/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py
index c05d2ced2..db6f9cc89 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py
@@ -18,8 +18,8 @@ import time
import mock
import unittest
-from yardstick.benchmark.scenarios.networking import vsperf_dpdk
from yardstick import exceptions as y_exc
+from yardstick.benchmark.scenarios.networking import vsperf_dpdk
class VsperfDPDKTestCase(unittest.TestCase):
@@ -59,17 +59,18 @@ class VsperfDPDKTestCase(unittest.TestCase):
self.scenario = vsperf_dpdk.VsperfDPDK(self.args, self.ctx)
- self._mock_ssh = mock.patch(
- 'yardstick.benchmark.scenarios.networking.vsperf_dpdk.ssh')
+ self._mock_ssh = mock.patch.object(vsperf_dpdk, 'ssh')
self.mock_ssh = self._mock_ssh.start()
self._mock_subprocess_call = mock.patch.object(subprocess, 'call')
self.mock_subprocess_call = self._mock_subprocess_call.start()
-
+ self._mock_log_info = mock.patch.object(vsperf_dpdk.LOG, 'info')
+ self.mock_log_info = self._mock_log_info.start()
self.addCleanup(self._cleanup)
def _cleanup(self):
self._mock_ssh.stop()
self._mock_subprocess_call.stop()
+ self._mock_log_info.stop()
def test_setup(self):
# setup() specific mocks