def test_resolve_raw_data(self) -> None: """Test resolve_raw_data.""" raw_data = "namespace: ${namespace}" expected = "namespace: test" assert (CfnginConfig.resolve_raw_data(raw_data, parameters={"namespace": "test"}) == expected)
def test_resolve_raw_data_ignore_lookup(self) -> None: """Test resolve_raw_data ignores lookups.""" lookup_raw_data = "namespace: ${env something}" assert CfnginConfig.resolve_raw_data( lookup_raw_data) == lookup_raw_data
def test_resolve_raw_data_missing_value(self) -> None: """Test resolve_raw_data missing value.""" with pytest.raises(MissingEnvironment) as excinfo: CfnginConfig.resolve_raw_data("namespace: ${namespace}") assert excinfo.value.key == "namespace"