diff options
| author | LV-426 <lv-426@taproot.org.il> | 2014-10-15 22:12:56 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2014-10-15 22:12:56 +0200 |
| commit | dcbc18c61d0917008c09c7a15ec57045641a9bce (patch) | |
| tree | 224e8270b81ac3a2d67e161eb5b3d62c92b1b15f /src-py/test_db_controller.py | |
| parent | 3d0306271a427f7a2e47aea18429c1cad8e74bee (diff) | |
DBO_attr_diff_commit & test - todo: parse DB response
Diffstat (limited to 'src-py/test_db_controller.py')
| -rw-r--r-- | src-py/test_db_controller.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src-py/test_db_controller.py b/src-py/test_db_controller.py index 254afb80..66ecfd09 100644 --- a/src-py/test_db_controller.py +++ b/src-py/test_db_controller.py @@ -193,6 +193,21 @@ class TestDBController(unittest.TestCase): id_set = self.db_ctl.exec_op(dbc.DBO_match_link_set_by_src_or_dst_id_attributes(src_id=n_1_id, dst_id=n_0_id)) self.assertEqual(len(id_set), 1) + def test_attr_diff_commit(self): + # create test node + n_id = rand_id() + topo_diff = Topo_Diff(node_set_add=[{'__type': 'T_test_attr_diff_commit', 'id': n_id, 'attr_rm': 0}]) + op = dbc.DBO_topo_diff_commit(topo_diff) + self.db_ctl.exec_op(op) + + # apply attr_diff + attr_diff = {n_id: {'attr_write': {'attr_0': 0, + 'attr_1': 'a'}, + 'attr_remove': ['attr_rm']}} + op = dbc.DBO_attr_diff_commit(attr_diff) + n_set = self.db_ctl.exec_op(op) + pass + def tearDown(self): pass if __name__ == "__main__": |
