def _ontology_has_ancestor_build_fail(cfg, expected): with raises(Exception) as got: builtin.ontology_has_ancestor(cfg) assert_exception_correct(got.value, expected)
def _ontology_has_ancestor_validate_fail(cfg, meta, expected): assert builtin.ontology_has_ancestor(cfg)('key', meta) == expected
def _ontology_has_ancestor_success(cfg, meta): assert builtin.ontology_has_ancestor(cfg)('key', meta) is None