def applications_export(): """Export Applications""" apps = {'applications':{}} for app in applications(): apps['applications'].setdefault(app.name, {'attributes': \ {'author':app.author, 'name':app.name, 'version':app.version}}) if app.nodes: apps['applications'][app.name].setdefault('nodes', {}) for node in app.nodes: apps['applications'][app.name]['nodes'].setdefault(node.name, prop_dict(node)) return apps
def test_prop_list(self): announcement('PROP_LIST') self.assertEqual(len(prop_dict(node_1).keys()), 5) self.assertEqual(len(prop_list(node_1)), 7)
def export(self): return {self.name:prop_dict(self)}
def test_prop_list(self): announcement('PROP_LIST') self.assertEqual(len(prop_dict(node_1).keys()), 5) self.assertEqual(len(prop_list(node_1)), 7)