diff options
Diffstat (limited to 'functest/tests/unit')
-rw-r--r-- | functest/tests/unit/cli/commands/test_cli_env.py | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | functest/tests/unit/core/test_testcase_base.py | 2 | ||||
-rw-r--r-- | functest/tests/unit/odl/test_odl.py | 1 | ||||
-rw-r--r-- | functest/tests/unit/test_logging.ini | 27 | ||||
-rw-r--r-- | functest/tests/unit/utils/test_functest_utils.py | 1 |
5 files changed, 27 insertions, 5 deletions
diff --git a/functest/tests/unit/cli/commands/test_cli_env.py b/functest/tests/unit/cli/commands/test_cli_env.py index f70761dc..4b6ea57a 100644 --- a/functest/tests/unit/cli/commands/test_cli_env.py +++ b/functest/tests/unit/cli/commands/test_cli_env.py @@ -11,7 +11,6 @@ import unittest from git.exc import NoSuchPathError import mock -mock.patch('logging.FileHandler').start() # noqa from functest.cli.commands import cli_env from functest.utils.constants import CONST from functest.tests.unit import test_utils diff --git a/functest/tests/unit/core/test_testcase_base.py b/functest/tests/unit/core/test_testcase_base.py index 8df524b0..94d2e966 100644..100755 --- a/functest/tests/unit/core/test_testcase_base.py +++ b/functest/tests/unit/core/test_testcase_base.py @@ -12,8 +12,6 @@ import mock import os import unittest -mock.patch('logging.FileHandler').start() # noqa - from functest.core import testcase_base diff --git a/functest/tests/unit/odl/test_odl.py b/functest/tests/unit/odl/test_odl.py index 59ab2c65..568fdc82 100644 --- a/functest/tests/unit/odl/test_odl.py +++ b/functest/tests/unit/odl/test_odl.py @@ -19,7 +19,6 @@ from robot.errors import DataError, RobotError from robot.result import testcase from robot.utils.robottime import timestamp_to_secs -mock.patch('logging.FileHandler').start() # noqa from functest.core import testcase_base from functest.opnfv_tests.sdn.odl import odl diff --git a/functest/tests/unit/test_logging.ini b/functest/tests/unit/test_logging.ini new file mode 100644 index 00000000..3d5b947c --- /dev/null +++ b/functest/tests/unit/test_logging.ini @@ -0,0 +1,27 @@ +[loggers]
+keys=root,functest_logger
+
+[logger_root]
+level=DEBUG
+handlers=console
+
+[logger_functest_logger]
+level=DEBUG
+handlers=console
+qualname=functest.utils.functest_logger
+propagate=0
+
+[handlers]
+keys=console
+
+[handler_console]
+class=StreamHandler
+level=INFO
+formatter=standard
+args=(sys.stdout,)
+
+[formatters]
+keys=standard
+
+[formatter_standard]
+format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
\ No newline at end of file diff --git a/functest/tests/unit/utils/test_functest_utils.py b/functest/tests/unit/utils/test_functest_utils.py index c4b56660..ce9086a7 100644 --- a/functest/tests/unit/utils/test_functest_utils.py +++ b/functest/tests/unit/utils/test_functest_utils.py @@ -18,7 +18,6 @@ import mock import requests from functest.tests.unit import test_utils -mock.patch('logging.FileHandler').start() # noqa from functest.utils import functest_utils |