From 269a64291f42c0a210226f7bf002cd4942f1d8fc Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Wed, 23 Jan 2019 18:49:48 +0000 Subject: Suppress log outputs in test_task.py Change-Id: Ic7b4ebe5fff9a0a31e395e67b8a3ea52d99442a9 JIRA: YARDSTICK-1541 Signed-off-by: Emma Foley --- yardstick/tests/unit/benchmark/core/test_task.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/yardstick/tests/unit/benchmark/core/test_task.py b/yardstick/tests/unit/benchmark/core/test_task.py index e1414c2ae..2bf7e2b9e 100644 --- a/yardstick/tests/unit/benchmark/core/test_task.py +++ b/yardstick/tests/unit/benchmark/core/test_task.py @@ -30,6 +30,14 @@ from yardstick.common import utils class TaskTestCase(unittest.TestCase): + def setUp(self): + self._mock_log = mock.patch.object(task, 'LOG') + self.mock_log = self._mock_log.start() + self.addCleanup(self._stop_mock) + + def _stop_mock(self): + self._mock_log.stop() + @mock.patch.object(base, 'Context') def test_parse_nodes_with_context_same_context(self, mock_context): scenario_cfg = { -- cgit 1.2.3-korg