diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-01-05 01:05:31 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-01-05 01:11:44 +0200 |
| commit | ba546ce9c0013bea1ea26b3e6497d8c269f4cb89 (patch) | |
| tree | 6ae5dc1c95370b43b427096553287e5082fe01f2 /src/server-tests | |
| parent | 78988be0459f7a9005030e6838b34145b4a63b83 (diff) | |
test_block_chain__commit_and_print()
Diffstat (limited to 'src/server-tests')
| -rw-r--r-- | src/server-tests/test_db_controller.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server-tests/test_db_controller.py b/src/server-tests/test_db_controller.py index 5aaa6d57..4093985f 100644 --- a/src/server-tests/test_db_controller.py +++ b/src/server-tests/test_db_controller.py @@ -109,6 +109,21 @@ class TestDBController(unittest.TestCase): l_set = self.db_ctl.exec_op(op) self.assertEqual(len(l_set), 2) + def test_block_chain__commit_and_print(self): + op_0 = DBO_block_chain__commit(blob_obj='blob 1') + op_1 = DBO_block_chain__commit(blob_obj='blob 2') + op_print = DBO_block_chain__list() + + _, _, hash_ret1 = self.db_ctl.exec_op(op_0) + _, _, hash_ret2 = self.db_ctl.exec_op(op_1) + hash_list = self.db_ctl.exec_op(op_print) + + hash_commit_0 = DBO_block_chain__commit.calc_blob_hash() # default empty blob hash + + self.assertEqual(hash_list.pop(), hash_commit_0) + self.assertEqual(hash_list.pop(), hash_ret1) + self.assertEqual(hash_list.pop(), hash_ret2) + def test_match_node_set_by_type(self): op = DBO_match_node_id_set(filter_label='Person') id_set = self.db_ctl.exec_op(op) |
