Fix tests

This commit is contained in:
Sylvain Bellemare 2016-12-08 16:57:56 +01:00
parent 2a820b46f3
commit 49fca5cf3f

View File

@ -26,6 +26,7 @@ def inputs(user_pk):
@pytest.mark.usefixtures('processes')
def test_fast_double_create(b, user_pk):
from bigchaindb.models import Transaction
from bigchaindb.backend.query import count_blocks
tx = Transaction.create([b.me], [([user_pk], 1)],
metadata={'test': 'test'}) \
.sign([b.me_private])
@ -42,12 +43,13 @@ def test_fast_double_create(b, user_pk):
# test the transaction appears only once
last_voted_block = b.get_last_voted_block()
assert len(last_voted_block.transactions) == 1
assert b.backend.count_blocks() == 2
assert count_blocks(b.connection) == 2
@pytest.mark.usefixtures('processes')
def test_double_create(b, user_pk):
from bigchaindb.models import Transaction
from bigchaindb.backend.query import count_blocks
tx = Transaction.create([b.me], [([user_pk], 1)],
metadata={'test': 'test'}) \
.sign([b.me_private])
@ -63,4 +65,4 @@ def test_double_create(b, user_pk):
# test the transaction appears only once
last_voted_block = b.get_last_voted_block()
assert len(last_voted_block.transactions) == 1
assert b.backend.count_blocks() == 2
assert count_blocks(b.connection) == 2