mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
prevent adding None as fulfillment / condition to Transaction
This commit is contained in:
parent
db127bea40
commit
c007d0d8b4
@ -1090,3 +1090,17 @@ def test_create_transfer_with_invalid_parameters():
|
|||||||
Transaction.transfer(['fulfillment'], {}, Asset())
|
Transaction.transfer(['fulfillment'], {}, Asset())
|
||||||
with raises(ValueError):
|
with raises(ValueError):
|
||||||
Transaction.transfer(['fulfillment'], [], Asset())
|
Transaction.transfer(['fulfillment'], [], Asset())
|
||||||
|
|
||||||
|
|
||||||
|
def test_cant_add_empty_condition():
|
||||||
|
from bigchaindb_common.transaction import Transaction
|
||||||
|
tx = Transaction(Transaction.CREATE, None)
|
||||||
|
with raises(TypeError):
|
||||||
|
tx.add_condition(None)
|
||||||
|
|
||||||
|
|
||||||
|
def test_cant_add_empty_fulfillment():
|
||||||
|
from bigchaindb_common.transaction import Transaction
|
||||||
|
tx = Transaction(Transaction.CREATE, None)
|
||||||
|
with raises(TypeError):
|
||||||
|
tx.add_fulfillment(None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user