Catch CC Error for Fulfillment

This commit is contained in:
tim 2016-09-16 11:12:55 +02:00 committed by Sylvain Bellemare
parent b653c1f8d2
commit 4eb6a8ee27

View File

@ -41,6 +41,19 @@ def test_fulfillment_deserialization_with_invalid_fulfillment(user_pub):
Fulfillment.from_dict(ffill)
def test_fulfillment_deserialization_with_invalid_fulfillment_uri(user_pub):
from bigchaindb_common.exceptions import InvalidSignature
from bigchaindb_common.transaction import Fulfillment
ffill = {
'owners_before': [user_pub],
'fulfillment': 'an invalid fulfillment',
'input': None,
}
with raises(InvalidSignature):
Fulfillment.from_dict(ffill)
def test_fulfillment_deserialization_with_unsigned_fulfillment(ffill_uri,
user_pub):
from bigchaindb_common.transaction import Fulfillment