OSDN Git Service

merge utxos add user confirm operation
[bytom/bytom-spanner.git] / utxomerger / unspent_outputs_test.py
1 import unittest
2
3 from Transaction import Transaction
4 from connection import Connection
5 from UnspentOutputs import UnspentOutputs
6
7
8 class TestUTXOMethods(unittest.TestCase):
9
10     def test_get_block_height(self):
11         con = Connection("http://127.0.0.1:9888")
12         block_height, ret = UnspentOutputs.get_block_height(connection=con)
13         if ret == 1:
14             print(block_height)
15
16     def test_list_UTXO(self):
17         con = Connection("http://127.0.0.1:9888")
18         utxos, ret = UnspentOutputs.list_UTXO(con)
19         if ret == 1:
20             for utxo in utxos:
21                 print(utxo)
22
23     if __name__ == '__main__':
24         unittest.main()