summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-05-04 23:57:28 +0300
committerLV-426 <lv-426@taproot.org.il>2015-05-05 19:28:08 +0300
commit467e5a4deea0108ebfd656bdbb91db98f2bdd632 (patch)
treeeb2abe30ce521065098cc4361385aaccd71e34ce /src
parent1d1045fe3a98e81d699cd17f9214cbc1e7f9a66f (diff)
db_controller: removing exec_cypher_query()
Diffstat (limited to 'src')
-rw-r--r--src/server-tests/test_rhizi_api.py6
-rw-r--r--src/server/db_controller.py12
2 files changed, 5 insertions, 13 deletions
diff --git a/src/server-tests/test_rhizi_api.py b/src/server-tests/test_rhizi_api.py
index ef72a327..a010522b 100644
--- a/src/server-tests/test_rhizi_api.py
+++ b/src/server-tests/test_rhizi_api.py
@@ -6,11 +6,13 @@ from werkzeug.test import EnvironBuilder
from db_controller import DB_Driver_Embedded
import db_controller as dbc
+from db_op import DBO_cypher_query
from rhizi_server import Config
import rz_api
from rz_server import Config
from test_util__pydev import debug__pydev_pd_arg
+
class TestRhiziAPI(unittest.TestCase):
def setUp(self):
@@ -48,7 +50,9 @@ class TestRhiziAPI(unittest.TestCase):
loading an existing node test
"""
id_set = ['skill_00']
- self.db_ctl.exec_cypher_query('create (s:Skill {id: \'skill_00\'} )')
+ q = ['create (s:Skill {id: \'skill_00\'} )']
+ op = DBO_cypher_query(q)
+ self.db_ctl.exec_op(op)
with rz_api.webapp.test_client() as c:
req = c.post('/load/node-set-by-id',
diff --git a/src/server/db_controller.py b/src/server/db_controller.py
index 33b595de..f10c7964 100644
--- a/src/server/db_controller.py
+++ b/src/server/db_controller.py
@@ -59,15 +59,3 @@ class DB_Controller:
def create_db_op(self, f_work, f_cont):
ret = DB_op(f_work, f_cont)
return ret
-
- def exec_cypher_query(self, q):
- """
- @deprecated: use DBO_cypher_query
- """
-
- # call post and not db_util.post_neo4j to avoid response key errors
- try:
- db_util.post(self.config.db_base_url + '/db/data/cypher', {"query" : q})
- except Exception as e:
- log.exception('q: %s' % (q))
- raise e