Skip to content
Snippets Groups Projects
Commit 3d478da4 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

Merge branch 'dev' into f-add-datatypes

parents f11a466d c6b1da47
No related branches found
No related tags found
2 merge requests!128MNT: Added a warning when column metadata is not configured, and a better...,!115add datatype, unit and description to properties that are part of Records
Pipeline #56982 failed
......@@ -148,8 +148,8 @@ class DataModel(dict):
else:
query = db.Query(f"FIND ENTITY with id={ent.id}")
ref = query.execute(unique=True)
diff = (describe_diff(*compare_entities(ent, ref
), name=ent.name))
diff = (describe_diff(*compare_entities(ent, ref),
name=ent.name))
if diff != "":
if verbose:
......
......@@ -22,6 +22,8 @@ from tempfile import NamedTemporaryFile
from pytest import raises, mark
import linkahead as db
import caosadvancedtools
from caosadvancedtools.models.parser import (TwiceDefinedException,
YamlDefinitionError,
parse_model_from_string,
......@@ -714,6 +716,7 @@ test_reference:
assert "id" in cs[1]
mq = Mock()
def mq_init(self, query):
self.query = query
......@@ -729,4 +732,22 @@ test_reference:
stdout, stderr = capfd.readouterr()
# TODO: test that there were no changes required
# TODO: test that there were no changes required
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment