aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2018-01-29 13:46:44 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-29 13:46:44 +0000
commit630a31629bffd6d881faf2e3ea3a849b4143c103 (patch)
treed5d64706bc65e407dae002e066b07fb361c0b0c1 /functest/tests
parent18c016a2eaf65fec880a04bcc354f52e9cdb4417 (diff)
parentc6092cb676363d89f366dc9a416ba6c53eeea33f (diff)
Merge "Fix pylint errors in several utils modules"
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("======================="