mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
get integration test working issue 633
This commit is contained in:
parent
2de652ad5c
commit
d1b3a206ca
@ -46,15 +46,16 @@ def test_double_create(b, user_pk):
|
||||
assert count_blocks(b.connection) == 2
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('processes', 'inputs')
|
||||
@pytest.mark.usefixtures('inputs')
|
||||
def test_get_owned_ids_works_after_double_spend(b, user_pk, user_sk):
|
||||
"""See issue 633."""
|
||||
""" Test for #633 https://github.com/bigchaindb/bigchaindb/issues/633 """
|
||||
from bigchaindb.models import Transaction
|
||||
input_valid = b.get_owned_ids(user_pk).pop()
|
||||
input_valid = b.get_transaction(input_valid.txid)
|
||||
tx_valid = Transaction.transfer(input_valid.to_inputs(),
|
||||
[([user_pk], 1)],
|
||||
input_valid.asset).sign([user_sk])
|
||||
input_valid.id,
|
||||
{'1': 1}).sign([user_sk])
|
||||
|
||||
# write the valid tx and wait for voting/block to catch up
|
||||
b.write_transaction(tx_valid)
|
||||
@ -66,8 +67,8 @@ def test_get_owned_ids_works_after_double_spend(b, user_pk, user_sk):
|
||||
# create another transaction with the same input
|
||||
tx_double_spend = Transaction.transfer(input_valid.to_inputs(),
|
||||
[([user_pk], 1)],
|
||||
input_valid.asset) \
|
||||
.sign([user_sk])
|
||||
input_valid.id,
|
||||
{'2': 2}).sign([user_sk])
|
||||
|
||||
# write the double spend tx
|
||||
b.write_transaction(tx_double_spend)
|
||||
|
Loading…
x
Reference in New Issue
Block a user