diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-05-24 17:35:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-05-24 17:35:19 +0000 |
commit | f9a37193d349217614e5953d5eae9cef4a287af1 (patch) | |
tree | eaf7ba0d1b153bb03204f8b1314b9a3424bca5e3 /functest/tests/unit/utils/test_functest_utils.py | |
parent | def004b361002a71222439aea98143db1a99c4fe (diff) | |
parent | c263443bd4343fc2fb9e882bc925cbed7c804286 (diff) |
Merge "Stop printing in console when testing functest_utils.py"
Diffstat (limited to 'functest/tests/unit/utils/test_functest_utils.py')
-rw-r--r-- | functest/tests/unit/utils/test_functest_utils.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py index 218f7f72..12604c1a 100644 --- a/functest/tests/unit/utils/test_functest_utils.py +++ b/functest/tests/unit/utils/test_functest_utils.py @@ -452,9 +452,8 @@ class FunctestUtilsTesting(unittest.TestCase): mock_logger_info.assert_called_once_with(msg_exec) mopen.assert_called_once_with(self.output_file, "w") - @mock.patch('functest.utils.functest_utils.logger.info') - def test_execute_command_args_missing_with_success(self, mock_logger_info, - ): + @mock.patch('sys.stdout') + def test_execute_command_args_missing_with_success(self, stdout=None): with mock.patch('functest.utils.functest_utils.subprocess.Popen') \ as mock_subproc_open: @@ -476,9 +475,8 @@ class FunctestUtilsTesting(unittest.TestCase): output_file=None) self.assertEqual(resp, 0) - @mock.patch('functest.utils.functest_utils.logger.error') - def test_execute_command_args_missing_with_error(self, mock_logger_error, - ): + @mock.patch('sys.stdout') + def test_execute_command_args_missing_with_error(self, stdout=None): with mock.patch('functest.utils.functest_utils.subprocess.Popen') \ as mock_subproc_open: |