def test_jsonpointer(): tl = TypedLeafs(nested_data, datamodel) for p, v in tl.leafs(): try: assert tl.jsonpointer(p.path).json() == v.json() except AttributeError: assert tl.jsonpointer(p.path) == v
def test_jsonpointer(): tl = TypedLeafs(nested_data,datamodel) for p, v in tl.leafs(): try: assert tl.jsonpointer(p.path).json() == v.json() except AttributeError: assert tl.jsonpointer(p.path) == v
def pub(publisher, parameters, state): topublish = TypedLeafs(publisher['outputmap'], parameters.leafmodel) for p, v in topublish.leafs(): value = parameters[v] if type(value) == known_types.SimpleFile: if not value.path: ensure_publicity(value, state) p.set(topublish, value) return topublish
def test_deepnest(): tl = TypedLeafs(nested_data, datamodel) paths = [p.path for p, v in tl.leafs()] assert set(paths) == set( ['/list_of_things/0', '/list_of_things/1', '/single_thing'])
def test_deepnest(): tl = TypedLeafs(nested_data,datamodel) paths = [p.path for p,v in tl.leafs()] assert set(paths) == set(['/list_of_things/0','/list_of_things/1','/single_thing'])