From 43bf12d6ab7bcaea16dc75ed4ccbe3895cf51da3 Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Wed, 9 Aug 2017 03:23:58 +0000 Subject: Add real time log view in GUI JIRA: YARDSTICK-775 We have GUI now, but we can't see real time log in GUI view. So I add real time log view in GUI. Change-Id: Ie83f327ef0a94302afa6b3def764fec6ef5818d1 Signed-off-by: chenjiankun --- tests/unit/benchmark/core/test_task.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/unit/benchmark') diff --git a/tests/unit/benchmark/core/test_task.py b/tests/unit/benchmark/core/test_task.py index 7f617537e..25688bf48 100644 --- a/tests/unit/benchmark/core/test_task.py +++ b/tests/unit/benchmark/core/test_task.py @@ -118,7 +118,8 @@ class TaskTestCase(unittest.TestCase): }, ]) - expected_get_network_calls = 4 # once for each vld_id in the nodes dict + # once for each vld_id in the nodes dict + expected_get_network_calls = 4 expected = { 'a': {'name': 'a', 'network_type': 'private'}, 'b': {'name': 'b', 'vld_id': 'y', 'subnet_cidr': '10.20.0.0/16'}, @@ -289,6 +290,13 @@ class TaskTestCase(unittest.TestCase): task.change_server_name(scenario, suffix) self.assertTrue(scenario['target']['name'], 'demo-8') + @mock.patch('yardstick.benchmark.core.task.logging') + def test_set_log(self, mock_logging): + task_obj = task.Task() + task_obj.task_id = 'task_id' + task_obj._set_log() + self.assertTrue(mock_logging.root.addHandler.called) + def _get_file_abspath(self, filename): curr_path = os.path.dirname(os.path.abspath(__file__)) file_path = os.path.join(curr_path, filename) -- cgit 1.2.3-korg