From a7edeebc90bdd335361a7b36f5f5d12a14375554 Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Sun, 28 Jan 2024 19:45:44 +0100 Subject: Enhanced validation of configuration of all tests Issue-ID: TEST-402 Signed-off-by: Lukasz Rajewski Change-Id: I2e4ef6365b44c33f4c0b3e72886a83f92c63e2f3 --- src/onaptests/scenario/basic_cnf_macro.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/onaptests/scenario/basic_cnf_macro.py') diff --git a/src/onaptests/scenario/basic_cnf_macro.py b/src/onaptests/scenario/basic_cnf_macro.py index 1fecd95..71b6863 100644 --- a/src/onaptests/scenario/basic_cnf_macro.py +++ b/src/onaptests/scenario/basic_cnf_macro.py @@ -1,13 +1,16 @@ """Instantiate basic cnf using SO macro flow.""" +from yaml import SafeLoader, load + from onapsdk.configuration import settings -from onaptests.scenario.scenario_base import BaseStep, ScenarioBase, YamlTemplateBaseScenarioStep +from onaptests.scenario.scenario_base import (BaseStep, ScenarioBase, + YamlTemplateBaseScenarioStep) from onaptests.steps.instantiate.service_macro import \ YamlTemplateServiceMacroInstantiateStep from onaptests.steps.onboard.cds import CbaPublishStep -from yaml import SafeLoader, load class BasicCnfMacroStep(YamlTemplateBaseScenarioStep): + """Main basic cnf macro scenario step.""" def __init__(self): """Initialize step. @@ -57,7 +60,7 @@ class BasicCnfMacroStep(YamlTemplateBaseScenarioStep): """ 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 -- cgit 1.2.3-korg