aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mock_settings.py
diff options
context:
space:
mode:
authorAlex Shatov <alexs@att.com>2018-06-21 09:19:07 -0400
committerAlex Shatov <alexs@att.com>2018-06-21 09:19:07 -0400
commitd444b320dea07248dc69c81d0ce9ea5fc353e701 (patch)
treecacd244c5e2424faca5e088dc3ca3baf9afd8511 /tests/mock_settings.py
parentc9ec231483d905f3a391c3985c2c2762344ed5c1 (diff)
3.0.1 policy-handler - cleaning sonar smells
- no change of functionality or API - removed the unused enum34>=1.1.6 from requirements.txt and setup.py - refactored run_policy.sh to redirect the stdout+stderr only once - refactoring to remove smells+vulnerability reported by sonar -- renamed Config.config to Config.settings -- removed the commented out code in customizer.py -- renamed StepTimer.NEXT to StepTimer.STATE_NEXT to avoid the naming confusion with the method StepTimer.next. Also renamed the related StepTimer.STATE_* constants -- refactored several functions by extracting methods to eliminate 4 out of 5 "brain-overload" smells reported by sonar -- moved the literal string for the socket_host "0.0.0.0" to a constant on the web-server to avoid the reported vulnerability Change-Id: I4c7d47d41c6ecd7cb28f6704f5dad2053c1ca7d6 Signed-off-by: Alex Shatov <alexs@att.com> Issue-ID: DCAEGEN2-515
Diffstat (limited to 'tests/mock_settings.py')
-rw-r--r--tests/mock_settings.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/mock_settings.py b/tests/mock_settings.py
index dddba7e..28bc6cc 100644
--- a/tests/mock_settings.py
+++ b/tests/mock_settings.py
@@ -45,7 +45,7 @@ class Settings(object):
Config.load_from_file("etc_upload/config.json")
- Config.config["catch_up"] = {"interval": 10, "max_skips": 2}
+ Config.settings["catch_up"] = {"interval": 10, "max_skips": 2}
Settings.logger = logging.getLogger("policy_handler.unit_test")
sys.stdout = LogWriter(Settings.logger.info)
@@ -56,4 +56,4 @@ class Settings(object):
Audit.init(Config.get_system_name(), Config.LOGGER_CONFIG_FILE_PATH)
Settings.logger.info("starting policy_handler with config:")
- Settings.logger.info(Audit.log_json_dumps(Config.config))
+ Settings.logger.info(Audit.log_json_dumps(Config.settings))