Esempio n. 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)
Esempio n. 2
0
 def test_slushy_json(self):
     graph_json = to_json(self.slushy_graph)
     graph = from_json(graph_json)
     self.bel_slushy_reconstituted(graph)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)