MCPcopy
hub / github.com/bigchaindb/bigchaindb / test_validation_error

Function test_validation_error

tests/tendermint/test_lib.py:84–95  ·  view source on GitHub ↗
(b)

Source from the content-addressed store, hash-verified

82
83
84def test_validation_error(b):
85 from bigchaindb.models import Transaction
86 from bigchaindb.common.crypto import generate_key_pair
87
88 alice = generate_key_pair()
89 tx = Transaction.create([alice.public_key],
90 [([alice.public_key], 1)],
91 asset=None)\
92 .sign([alice.private_key]).to_dict()
93
94 tx['metadata'] = ''
95 assert not b.validate_transaction(tx)
96
97
98@patch('requests.post')

Callers

nothing calls this directly

Calls 5

generate_key_pairFunction · 0.90
signMethod · 0.80
to_dictMethod · 0.45
createMethod · 0.45
validate_transactionMethod · 0.45

Tested by

no test coverage detected