示例#1
0
    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)
示例#2
0
 def test_slushy_json(self):
     graph_json = to_json(self.slushy_graph)
     graph = from_json(graph_json)
     self.bel_slushy_reconstituted(graph)
示例#3
0
 def test_thorough_json(self):
     graph_json_dict = to_json(sialic_acid_graph)
     graph = from_json(graph_json_dict)
     self.help_test_equal(graph)
示例#4
0
 def test_thorough_json(self):
     graph_json_dict = to_json(self.thorough_graph)
     graph = from_json(graph_json_dict)
     self.bel_thorough_reconstituted(graph)
示例#5
0
 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)