github.com/mit-dci/lit@v0.0.0-20221102210550-8c3d3b49f2ce/test/itest_receive.py (about) 1 import testlib 2 3 def run_test(env): 4 bc = env.bitcoind 5 lit = env.lits[0] 6 7 # First figure out where we should send the money. 8 addr = lit.make_new_addr() 9 print('Got address:', addr) 10 11 # Send a bitcoin. 12 bc.rpc.sendtoaddress(addr, 1) 13 env.generate_block() 14 print('Sent and mined...') 15 16 # Now verify that we got what we thought we would. 17 txo_total = lit.get_balance_info()['TxoTotal'] 18 print('lit balance:', txo_total) 19 if txo_total != 100000000: 20 raise AssertionError("Didn't get the amount we thought we would!")