Skip to content
Snippets Groups Projects
Commit 58b59fd7 authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Put back config property.

parent 59ec067f
No related branches found
No related tags found
No related merge requests found
......@@ -174,6 +174,7 @@ def test_schema(data_model):
ln.content_type() == ContentType.config)
assert ca.content_type() == cha.content_type() == ContentType.all
assert ll.content_type() == ContentType.nonconfig
assert lj.config == ca.config == cha.config == (not ll.config) == True
assert la.ns == ld.ns
assert lc.ns == "testb"
assert la.default_value() == 11
......
......@@ -63,6 +63,11 @@ class SchemaNode:
"""Qualified name of the receiver."""
return (self.name, self.ns)
@property
def config(self) -> bool:
"""Does the receiver represent configuration?"""
return self.content_type().value & ContentType.config.value != 0
def content_type(self) -> ContentType:
"""Receiver's content type."""
try:
......
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