From 38d261158f5b0276d8db6df83c854bcb0340fe17 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Sun, 5 Oct 2014 20:56:09 +0200 Subject: fix db_controller tests --- src-py/test_db_controller.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src-py') 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 -- cgit v1.3.1