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

reverted unwanted commit that also included indentation fix

parent 5f8a472d
No related branches found
No related tags found
2 merge requests!128MNT: Added a warning when column metadata is not configured, and a better...,!118Test to confirm (or reject) #71
Pipeline #56815 failed
This commit is part of merge request !118. Comments created here will be created in the context of that merge request.
......@@ -664,42 +664,3 @@ def test_setting_values():
assert model["Simulation"].name == "Simulation"
assert model["Simulation"].get_property("parameter").value == 26
def test_sync_output(capfd):
model = parse_model_from_string("""
RT:
obligatory_properties:
identifier:
datatype: TEXT
""")
existing_entities = [db.RecordType(name="RT", id=25).add_property(name="identifier",
datatype="INTEGER",
importance="OBLIGATORY",
id=24),
db.Property(name="identifier", datatype="INTEGER", id=24)]
def get_existing_entities(ent_cont):
return existing_entities
class MockQuery:
def __init__(self, q):
self.q = q
def execute(self, unique=True):
id = int(self.q.split("=")[1])
for existing_ent in existing_entities:
if existing_ent.id == id:
return existing_ent
return None
model.get_existing_entities = get_existing_entities
caosadvancedtools.models.parser.db.Query = MockQuery
caosadvancedtools.models.parser.db.Container.update = Mock()
model.sync_data_model(True, True)
assert caosadvancedtools.models.parser.db.Container.update.called
output, err = capfd.readouterr()
print(output)
assert "version from the yaml file: TEXT" in output
assert "version from LinkAhead: INTEGER" in output
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