MCPcopy
hub / github.com/bigchaindb/bigchaindb / test_post_transaction_invalid_mode

Function test_post_transaction_invalid_mode

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

Source from the content-addressed store, hash-verified

139
140
141def test_post_transaction_invalid_mode(b):
142 from bigchaindb.models import Transaction
143 from bigchaindb.common.crypto import generate_key_pair
144 from bigchaindb.common.exceptions import ValidationError
145 alice = generate_key_pair()
146 tx = Transaction.create([alice.public_key],
147 [([alice.public_key], 1)],
148 asset=None) \
149 .sign([alice.private_key]).to_dict()
150 tx = b.validate_transaction(tx)
151 with pytest.raises(ValidationError):
152 b.write_transaction(tx, 'nope')
153
154
155@pytest.mark.bdb

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected