aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-01-26 14:29:01 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-01-26 18:14:28 +0100
commitc6092cb676363d89f366dc9a416ba6c53eeea33f (patch)
treea850e02e9aebb2e05203437685a04312226f3f45 /functest/tests
parent4862f742a08658459afee5e272122af5f2cdc9de (diff)
Fix pylint errors in several utils modules
All utils which are moving to xtesting are now fixed. It remains OpenStack and Functest utils (+ the related unit tests) which doesn't move to the new package. Change-Id: If13c627c8444c62d5c6bf9c8057d6413aa0e56c7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests')
-rw-r--r--functest/tests/unit/utils/test_functest_utils.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py
index 4438c6a2..218d03c4 100644
--- a/functest/tests/unit/utils/test_functest_utils.py
+++ b/functest/tests/unit/utils/test_functest_utils.py
@@ -10,12 +10,12 @@
# pylint: disable=missing-docstring
import logging
-import pkg_resources
import os
import time
import unittest
import mock
+import pkg_resources
from six.moves import urllib
from functest.utils import functest_utils
@@ -147,8 +147,8 @@ class FunctestUtilsTesting(unittest.TestCase):
def cmd_readline(self):
return 'test_value\n'
- @mock.patch('functest.utils.functest_utils.logger.error')
- @mock.patch('functest.utils.functest_utils.logger.info')
+ @mock.patch('functest.utils.functest_utils.LOGGER.error')
+ @mock.patch('functest.utils.functest_utils.LOGGER.info')
def test_execute_command_args_present_with_error(self, mock_logger_info,
mock_logger_error):
with mock.patch('functest.utils.functest_utils.subprocess.Popen') \
@@ -178,7 +178,7 @@ class FunctestUtilsTesting(unittest.TestCase):
mopen.assert_called_once_with(self.output_file, "w")
mock_logger_error.assert_called_once_with(self.error_msg)
- @mock.patch('functest.utils.functest_utils.logger.info')
+ @mock.patch('functest.utils.functest_utils.LOGGER.info')
def test_execute_command_args_present_with_success(self, mock_logger_info,
):
with mock.patch('functest.utils.functest_utils.subprocess.Popen') \
@@ -255,7 +255,7 @@ class FunctestUtilsTesting(unittest.TestCase):
def _get_functest_config(self, var):
return var
- @mock.patch('functest.utils.functest_utils.logger.error')
+ @mock.patch('functest.utils.functest_utils.LOGGER.error')
def test_get_dict_by_test(self, mock_logger_error):
with mock.patch('six.moves.builtins.open', mock.mock_open()), \
mock.patch('functest.utils.functest_utils.yaml.safe_load') \
@@ -321,7 +321,7 @@ class FunctestUtilsTesting(unittest.TestCase):
resp = functest_utils.get_functest_yaml()
self.assertEqual(resp, self.file_yaml)
- @mock.patch('functest.utils.functest_utils.logger.info')
+ @mock.patch('functest.utils.functest_utils.LOGGER.info')
def test_print_separator(self, mock_logger_info):
functest_utils.print_separator()
mock_logger_info.assert_called_once_with("======================="