mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Cleanup integration test
This commit is contained in:
parent
e10ada0ad4
commit
dc5cfb43f8
@ -1,36 +1,14 @@
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
from bigchaindb import Bigchain
|
||||
|
||||
|
||||
# TODO remove as it is unused?
|
||||
@pytest.fixture
|
||||
def inputs(user_pk):
|
||||
from bigchaindb.models import Transaction
|
||||
|
||||
b = Bigchain()
|
||||
|
||||
# create blocks with transactions for `USER` to spend
|
||||
for block in range(4):
|
||||
transactions = [
|
||||
Transaction.create(
|
||||
[b.me], [([user_pk], 1)],
|
||||
metadata={'i': i})
|
||||
.sign([b.me_private])
|
||||
for i in range(10)
|
||||
]
|
||||
block = b.create_block(transactions)
|
||||
b.write_block(block, durability='hard')
|
||||
|
||||
|
||||
@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])
|
||||
metadata={'test': 'test'}).sign([b.me_private])
|
||||
|
||||
# write everything fast
|
||||
b.write_transaction(tx)
|
||||
@ -52,8 +30,7 @@ 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])
|
||||
metadata={'test': 'test'}).sign([b.me_private])
|
||||
|
||||
b.write_transaction(tx)
|
||||
time.sleep(2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user