aboutsummaryrefslogtreecommitdiffstats
path: root/src/onaptests/steps/onboard/service.py
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2024-01-28 19:45:44 +0100
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2024-01-29 22:24:42 +0100
commita7edeebc90bdd335361a7b36f5f5d12a14375554 (patch)
tree0e48ee456ef26471271c5412f3205aafcda41857 /src/onaptests/steps/onboard/service.py
parent2479155376b6142e97163a7903632015fed50815 (diff)
Enhanced validation of configuration of all tests
Issue-ID: TEST-402 Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> Change-Id: I2e4ef6365b44c33f4c0b3e72886a83f92c63e2f3
Diffstat (limited to 'src/onaptests/steps/onboard/service.py')
-rw-r--r--src/onaptests/steps/onboard/service.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/onaptests/steps/onboard/service.py b/src/onaptests/steps/onboard/service.py
index bcf153f..d2391b3 100644
--- a/src/onaptests/steps/onboard/service.py
+++ b/src/onaptests/steps/onboard/service.py
@@ -147,9 +147,9 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep):
"""
if settings.MODEL_YAML_TEMPLATE:
return self.model_yaml_template
- elif self.is_root:
+ if self.is_root:
if not self._yaml_template:
- with open(settings.SERVICE_YAML_TEMPLATE, "r") as yaml_template:
+ with open(settings.SERVICE_YAML_TEMPLATE, "r", encoding="utf-8") as yaml_template:
self._yaml_template: dict = load(yaml_template, SafeLoader)
return self._yaml_template
return self.parent.yaml_template
@@ -166,7 +166,8 @@ class YamlTemplateServiceOnboardStep(YamlTemplateBaseStep):
"""
if self.is_root:
if not self._model_yaml_template:
- with open(settings.MODEL_YAML_TEMPLATE, "r") as model_yaml_template:
+ with open(settings.MODEL_YAML_TEMPLATE, "r",
+ encoding="utf-8") as model_yaml_template:
self._model_yaml_template: dict = load(model_yaml_template, SafeLoader)
return self._model_yaml_template
return self.parent.model_yaml_template