diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-06-29 17:45:47 +0100 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-06-29 17:46:14 +0100 |
commit | 244c4846fb5fccdd0d93c448c6a46b14da8f7b76 (patch) | |
tree | 863a054cf7cd62c38cd28737ca5a505745bb17c7 | |
parent | 0c997fce84d917171c5bab2ed39d7856e58b9a5a (diff) |
Cleanup Plugin unit tests
Removed unneeded output (LOG.info and print functions).
JIRA: YARDSTICK-1274
Change-Id: Ida3b62ce28e27058a8b4a3a9e6fa16f041a1f99c
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
-rw-r--r-- | yardstick/tests/unit/benchmark/core/test_plugin.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/yardstick/tests/unit/benchmark/core/test_plugin.py b/yardstick/tests/unit/benchmark/core/test_plugin.py index 0d14e4e86..53621316b 100644 --- a/yardstick/tests/unit/benchmark/core/test_plugin.py +++ b/yardstick/tests/unit/benchmark/core/test_plugin.py @@ -12,6 +12,7 @@ import os import pkg_resources import mock +import six import testtools from yardstick import ssh @@ -48,13 +49,17 @@ deployment: self.mock_ssh_from_node.return_value = self.mock_ssh_obj self.mock_ssh_obj.wait = mock.Mock() self.mock_ssh_obj._put_file_shell = mock.Mock() + self._mock_log_info = mock.patch.object(plugin.LOG, 'info') + self.mock_log_info = self._mock_log_info.start() self.addCleanup(self._cleanup) def _cleanup(self): self._mock_ssh_from_node.stop() + self._mock_log_info.stop() - def test_install(self): + @mock.patch.object(six.moves.builtins, 'print') + def test_install(self, *args): args = mock.Mock() args.input_file = [mock.Mock()] with mock.patch.object(self.plugin, '_install_setup') as \ @@ -65,7 +70,8 @@ deployment: PluginTestCase.DEPLOYMENT) mock_run.assert_called_once_with(PluginTestCase.NAME) - def test_remove(self): + @mock.patch.object(six.moves.builtins, 'print') + def test_remove(self, *args): args = mock.Mock() args.input_file = [mock.Mock()] with mock.patch.object(self.plugin, '_remove_setup') as \ |