Suppress log outputs in test_task.py 33/66733/1
authorEmma Foley <emma.l.foley@intel.com>
Wed, 23 Jan 2019 18:49:48 +0000 (18:49 +0000)
committerEmma Foley <emma.l.foley@intel.com>
Mon, 28 Jan 2019 21:51:59 +0000 (21:51 +0000)
Change-Id: Ic7b4ebe5fff9a0a31e395e67b8a3ea52d99442a9
JIRA: YARDSTICK-1541
Signed-off-by: Emma Foley <emma.l.foley@intel.com>
yardstick/tests/unit/benchmark/core/test_task.py

index e1414c2..2bf7e2b 100644 (file)
@@ -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 = {