瀏覽代碼

Fix PATCH method; change test RDF store connector to autocommit changes.

Stefano Cossu 7 年之前
父節點
當前提交
f540f2ddbc
共有 2 個文件被更改,包括 3 次插入4 次删除
  1. 2 3
      conftest.py
  2. 1 1
      lakesuperior/model/ldp_rs.py

+ 2 - 3
conftest.py

@@ -30,18 +30,17 @@ def db(app):
     dbconf = app.config['store']['ldp_rs']
     db = GraphStoreConnector(
             query_ep=dbconf['webroot'] + dbconf['query_ep'],
-            update_ep=dbconf['webroot'] + dbconf['update_ep'])
+            update_ep=dbconf['webroot'] + dbconf['update_ep'],
+            autocommit=True)
 
     db.ds.default_context.parse(source='data/bootstrap/simple_layout.nq',
             format='nquads')
-    db.store.commit()
 
     yield db
 
     print('Tearing down fixure graph store.')
     for g in db.ds.graphs():
         db.ds.remove_graph(g)
-    db.store.commit()
 
 
 @pytest.fixture

+ 1 - 1
lakesuperior/model/ldp_rs.py

@@ -70,7 +70,7 @@ class LdpRs(Ldpr):
 
         @param update_str (string) SPARQL-Update staements.
         '''
-        delta = self._sparql_delta(update_str)
+        delta = self._sparql_delta(update_str.replace('<>', self.urn.n3()))
 
         return self.rdfly.modify_dataset(*delta)