Skip to content
Snippets Groups Projects

Test to confirm (or reject) #71

Merged Alexander Schlemmer requested to merge f-confirm-setting-values into dev
@@ -22,6 +22,7 @@ from tempfile import NamedTemporaryFile
from pytest import raises, mark
import linkahead as db
from caosadvancedtools.models.parser import (TwiceDefinedException,
YamlDefinitionError,
parse_model_from_string,
@@ -641,3 +642,21 @@ RT2:
</RecordType>
, 'bar': <RecordType name="bar"/>
}"""
def test_setting_values():
model = parse_model_from_string("""
parameter:
datatype: INTEGER
Simulation:
role: Record
obligatory_properties:
parameter: 26
""")
assert len(model) == 2
assert str(model["parameter"])[:-1] == '<Property name="parameter" datatype="INTEGER"/>'
assert model["Simulation"].role == "Record"
assert model["Simulation"].name == "Simulation"
assert model["Simulation"].get_property("parameter").value == 26
Loading