diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-10-07 21:19:36 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2014-10-07 21:19:36 +0200 |
| commit | 337e0d2ce4706e8ebd176b7a7e6e5f82d461e007 (patch) | |
| tree | 42c82a893387743fc81b883d66a2d3945161940d /src-py/test_db_controller.py | |
| parent | e69fcf28ea7fe5af9c46b71dd03e86b75f885e27 (diff) | |
DB_op statement __iter__
Diffstat (limited to 'src-py/test_db_controller.py')
| -rw-r--r-- | src-py/test_db_controller.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src-py/test_db_controller.py b/src-py/test_db_controller.py index f64c47ce..f7092e6d 100644 --- a/src-py/test_db_controller.py +++ b/src-py/test_db_controller.py @@ -29,6 +29,20 @@ class TestDBController(unittest.TestCase): def setUp(self): pass + def test_db_op_statement_iter(self): + s_arr = ['match (n) return n', + 'create (b:Book {\'title\': \'foo\'}) return b'] + + db_op = dbc.DB_op() + db_op.add_statement(s_arr[0]) + db_op.add_statement(s_arr[1]) + + i = 0 + for s in db_op: + # access: second tuple item -> REST-form 'statement' key + self.assertEqual(s_arr[i], s[1]['statement']) + i = i + 1 + def test_load_node_set_by_attribute(self): filter_map = { 'name': ['Bob', u'Judo'], 'age': [128] } |
