Skip to content
Snippets Groups Projects
Verified Commit 18227c66 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

FIX: Added `description` to the internal properties.

parent 4ead9298
No related branches found
No related tags found
2 merge requests!39Release 0.4.0,!37F extern name
Pipeline #21042 passed
......@@ -37,7 +37,7 @@ def teardown_module():
_delete_everything()
def test_name_in_extern():
def test_internal_props_in_extern():
"""Test adding the internal `name` property as a parent to an existing
property.
......@@ -47,15 +47,23 @@ def test_name_in_extern():
extern:
- name
- test_name
- description
- unit
test_name:
inherit_from_suggested:
- name
- description
- unit
"""
db.Property(name="test_name", datatype=db.TEXT).insert()
ents = parse_model_from_string(model)
ents.sync_data_model(noquestion=True)
test_prop = db.Property(name="test_name").retrieve()
assert len(test_prop.parents) == 3
desc_prop = db.Property(name="description").retrieve()
name_prop = db.Property(name="name").retrieve()
assert len(test_prop.parents) == 1
unit_prop = db.Property(name="unit").retrieve()
assert test_prop.has_parent(desc_prop)
assert test_prop.has_parent(name_prop)
assert test_prop.has_parent(unit_prop)
......@@ -34,6 +34,7 @@ from caosdb.apiutils import compare_entities, describe_diff
CAOSDB_INTERNAL_PROPERTIES = [
"description",
"name",
"unit",
]
......
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