mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
test Vote.validate_tx transaction exists
This commit is contained in:
parent
bc687ca229
commit
4216c17339
@ -672,3 +672,14 @@ def test_vote_no_double_inclusion(b):
|
||||
b.write_block(block)
|
||||
r = vote.Vote().validate_tx(tx, 'other_block_id', 1)
|
||||
assert r == (False, 'other_block_id', 1)
|
||||
|
||||
|
||||
@pytest.mark.genesis
|
||||
def test_duplicate_transaction(signed_create_tx):
|
||||
from bigchaindb.pipelines import vote
|
||||
|
||||
with patch('bigchaindb.core.Bigchain.is_new_transaction') as is_new:
|
||||
is_new.return_value = False
|
||||
res = vote.Vote().validate_tx(signed_create_tx.to_dict(), 'a', 1)
|
||||
assert res == (False, 'a', 1)
|
||||
assert is_new.call_count == 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user