mirror of
https://github.com/planetmint/planetmint.git
synced 2025-07-05 20:22:32 +00:00
fixed test_update_utxoset
Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
This commit is contained in:
parent
ea8ef5395a
commit
a7d8a8e9f5
@ -152,17 +152,17 @@ def test_post_transaction_invalid_mode(b, test_abci_rpc):
|
|||||||
|
|
||||||
@pytest.mark.bdb
|
@pytest.mark.bdb
|
||||||
def test_update_utxoset(b, signed_create_tx, signed_transfer_tx, db_conn):
|
def test_update_utxoset(b, signed_create_tx, signed_transfer_tx, db_conn):
|
||||||
update_utxoset(b.models.connection, signed_create_tx)
|
b.models.update_utxoset(signed_create_tx.to_dict())
|
||||||
utxoset = db_conn.get_space("utxos")
|
utxoset = db_conn.get_space("utxos")
|
||||||
assert utxoset.select().rowcount == 1
|
assert utxoset.select().rowcount == 1
|
||||||
utxo = utxoset.select().data
|
utxo = utxoset.select().data
|
||||||
assert utxo[0][1] == signed_create_tx.id
|
assert utxo[0][5] == signed_create_tx.id
|
||||||
assert utxo[0][2] == 0
|
assert utxo[0][4] == 0
|
||||||
update_utxoset(b.models.connection, signed_transfer_tx)
|
b.models.update_utxoset(signed_transfer_tx.to_dict())
|
||||||
assert utxoset.select().rowcount == 1
|
assert utxoset.select().rowcount == 1
|
||||||
utxo = utxoset.select().data
|
utxo = utxoset.select().data
|
||||||
assert utxo[0][1] == signed_transfer_tx.id
|
assert utxo[0][5] == signed_transfer_tx.id
|
||||||
assert utxo[0][2] == 0
|
assert utxo[0][4] == 0
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.bdb
|
@pytest.mark.bdb
|
||||||
|
Loading…
x
Reference in New Issue
Block a user