From 6fa9d5f563caa0305f5b02c4f0aebdda8e5885ac Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 18 Jul 2016 11:02:02 +0200 Subject: [PATCH] fix fixture --- tests/db/conftest.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/db/conftest.py b/tests/db/conftest.py index 4ae4f0c3..d89ca004 100644 --- a/tests/db/conftest.py +++ b/tests/db/conftest.py @@ -98,23 +98,22 @@ def cleanup_tables(request, node_config): @pytest.fixture -def inputs(user_vk, amount=4, b=None, blocks=4): +def inputs(user_vk): from bigchaindb.exceptions import GenesisBlockAlreadyExistsError # 1. create the genesis block - b = b or Bigchain() + b = Bigchain() try: b.create_genesis_block() except GenesisBlockAlreadyExistsError: pass # 2. create block with transactions for `USER` to spend - for block in range(blocks): + for block in range(4): transactions = [] - for i in range(amount): + for i in range(10): tx = b.create_transaction(b.me, user_vk, None, 'CREATE') tx_signed = b.sign_transaction(tx, b.me_private) transactions.append(tx_signed) - b.write_transaction(tx_signed) block = b.create_block(transactions) b.write_block(block, durability='hard')