Пример #1
0
    
    def join_space(self, space):
        pass
    
    def leave_space(self, space):
        pass
    
    def get_spaces(self):
        pass
    
    def read_uri(self, graph, space=None):
        pass
    
    def read_template(self, template, space=None):
        pass
    
    def query(self, template, space=None):
        pass
    
    def write(self, triples, space=None):
        pass

if __name__ == '__main__':
    sc = ServerCentralizedKernel()
    
    from utils.testing import generate_random_graph
    sc.write( generate_random_graph() )
    
    sc.app.debug = True
    sc.app.run()
    #app.run(host='0.0.0.0')
Пример #2
0
 def test_get_graph_uris(self):
     graph_uri = self.kernel.write(generate_random_graph())
     response = self._get_url("/spaces/%s/graphs" % urllib.quote_plus(self.kernel.data_access._defaultSpace))
     assert str(graph_uri) in response["graphs"]