def receive(): """Receives a JSON serialized BEL graph""" try: graph = from_json(flask.request.get_json()) except Exception as e: return render_upload_error(e) return try_insert_graph(manager, graph)
def test_slushy_json(self): graph_json = to_json(self.slushy_graph) graph = from_json(graph_json) self.bel_slushy_reconstituted(graph)
def test_thorough_json(self): graph_json_dict = to_json(sialic_acid_graph) graph = from_json(graph_json_dict) self.help_test_equal(graph)
def test_thorough_json(self): graph_json_dict = to_json(self.thorough_graph) graph = from_json(graph_json_dict) self.bel_thorough_reconstituted(graph)
def test_thorough_json(self): """Test the round-trip through node-link JSON.""" graph_json_dict = to_json(sialic_acid_graph) graph = from_json(graph_json_dict) self.help_test_equal(graph)