diff options
Diffstat (limited to 'moon_manager/tests/func_tests/features/environment.py')
-rw-r--r-- | moon_manager/tests/func_tests/features/environment.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/moon_manager/tests/func_tests/features/environment.py b/moon_manager/tests/func_tests/features/environment.py new file mode 100644 index 00000000..b65c292d --- /dev/null +++ b/moon_manager/tests/func_tests/features/environment.py @@ -0,0 +1,27 @@ +# Software Name: MOON: + +# Version: 5.4 + +# SPDX-FileCopyrightText: Copyright (c) 2018-2020 Orange and its contributors +# SPDX-License-Identifier: Apache-2.0 + +# This software is distributed under the 'Apache License 2.0', +# the text of which is available at 'http://www.apache.org/licenses/LICENSE-2.0.txt' +# or see the "LICENSE" file for more details. + +from __future__ import print_function +import logging + +logger = logging.getLogger(__name__) + +def before_feature(context, feature): + handler = logging.FileHandler(filename='Logs/'+"Automation Testing Log- "+ feature.name + ".log") + formatter = logging.Formatter('%(asctime)s : %(levelname)s : %(message)s') + handler.setFormatter(formatter) + handler.setLevel(logging.INFO) + logger.addHandler(handler) + + +def before_all(context): + logging.getLogger("requests").setLevel(logging.WARN) + |