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

TEST: get_deep with inheritance

parent 96a0ab9f
No related branches found
No related tags found
2 merge requests!89ENH: JsonSchemaExporter accepts do_not_create parameter.,!83ENH: JsonSchemaExporter can merge schemata and arrayize them
......@@ -723,3 +723,21 @@ RT2:
array = jsex.make_array(schema_RT1)
assert array["type"] == "array"
assert array["items"] == schema_RT1
def test_inheritance():
"""Test data models with inherited properties."""
model_str = """
some_date:
datatype: DATETIME
RT1:
obligatory_properties:
some_date:
RT2:
inherit_from_suggested:
- RT1
"""
model = parse_model_from_string(model_str)
rt2_deep = model.get_deep("RT2")
assert "some_date" in [prop.name for prop in rt2_deep.properties]
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