mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Fix test_transaction_exists
This commit is contained in:
parent
4585b7b5ae
commit
40ba9d8c6a
@ -84,11 +84,9 @@ def test_has_previous_vote(monkeypatch):
|
||||
bigchain.has_previous_vote(block)
|
||||
|
||||
|
||||
@pytest.mark.skipif(reason='meh')
|
||||
@pytest.mark.parametrize('items,exists', (((0,), True), ((), False)))
|
||||
def test_transaction_exists(monkeypatch, items, exists):
|
||||
@pytest.mark.parametrize('count,exists', ((1, True), (0, False)))
|
||||
def test_transaction_exists(monkeypatch, count, exists):
|
||||
from bigchaindb.core import Bigchain
|
||||
monkeypatch.setattr(
|
||||
RqlQuery, 'run', lambda x, y: namedtuple('response', 'items')(items))
|
||||
monkeypatch.setattr(RqlQuery, 'run', lambda x, y: count)
|
||||
bigchain = Bigchain(public_key='pubkey', private_key='privkey')
|
||||
assert bigchain.transaction_exists('txid') is exists
|
||||
|
Loading…
x
Reference in New Issue
Block a user