MCPcopy
hub / github.com/bigchaindb/bigchaindb / inputs

Function inputs

tests/conftest.py:311–326  ·  view source on GitHub ↗
(user_pk, b, alice)

Source from the content-addressed store, hash-verified

309
310@pytest.fixture
311def inputs(user_pk, b, alice):
312 from bigchaindb.models import Transaction
313 # create blocks with transactions for `USER` to spend
314 for height in range(1, 4):
315 transactions = [
316 Transaction.create(
317 [alice.public_key],
318 [([user_pk], 1)],
319 metadata={'msg': random.random()},
320 ).sign([alice.private_key])
321 for _ in range(10)
322 ]
323 tx_ids = [tx.id for tx in transactions]
324 block = Block(app_hash='hash'+str(height), height=height, transactions=tx_ids)
325 b.store_block(block._asdict())
326 b.store_bulk_transactions(transactions)
327
328
329@pytest.fixture

Callers

nothing calls this directly

Calls 4

signMethod · 0.80
store_blockMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected