(b)
| 139 | |
| 140 | |
| 141 | def 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 |
nothing calls this directly
no test coverage detected