summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2014-10-05 20:56:09 +0200
committerLV-426 <lv-426@taproot.org.il>2014-10-05 20:56:09 +0200
commit38d261158f5b0276d8db6df83c854bcb0340fe17 (patch)
tree9db61937f2e05836ed66903c32861b36f1998bfd
parent792d23d1670c8796ab2dad61922be7914e5349d0 (diff)
fix db_controller tests
-rw-r--r--src-py/test_db_controller.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/src-py/test_db_controller.py b/src-py/test_db_controller.py
index 3c8f4aff..d268daf7 100644
--- a/src-py/test_db_controller.py
+++ b/src-py/test_db_controller.py
@@ -35,6 +35,15 @@ class TestDBController(unittest.TestCase):
"""
self.db_ctl.exec_cypher_query('match (n) optional match (n)-[r]-() delete n,r')
+ def test_load_node_set_by_attribute(self):
+ filter_map = { 'name': ['Bob', 'Judo'],
+ 'age': [128] }
+ n_set = self.db_ctl.exec_op(dbc.DBO_load_node_set_by_attribute(filter_map))
+ self.assertEqual(len(n_set), 1)
+
+ def test_load_node_set_by_id_attribute(self):
+ n_set = self.db_ctl.exec_op(dbc.DBO_load_node_set_by_id_attribute(['skill_00', 'person_01']))
+ self.assertEqual(len(n_set), 2)
def test_node_DB_id_lifecycle(self):
"""
@@ -44,14 +53,7 @@ class TestDBController(unittest.TestCase):
n_set = self.db_ctl.exec_op(dbc.DBO_load_node_set_by_DB_id(id_set))
self.assertEqual(len(n_set), len(id_set), 'incorrect result size')
- def test_node_lifecycle(self):
- """
- test node commit & load
- """
-
- self.db_ctl.exec_op(dbc.DBO_add_node_set(self.n_map))
- n_set = self.db_ctl.exec_op(dbc.DBO_load_node_set_by_id_attribute(['skill_00', 'person_01']))
- self.assertEqual(len(n_set), 2, 'incorrect result size')
+ def test_load_node_set_by_DB_id(self): pass
def tearDown(self): pass