mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Fix test case
This commit is contained in:
parent
d3ac54e839
commit
42655f1cfc
@ -310,6 +310,7 @@ def test_validate_tx_simple_signature(default_single_ffill, default_single_cond,
|
|||||||
from bigchaindb_common.crypto import SigningKey
|
from bigchaindb_common.crypto import SigningKey
|
||||||
from bigchaindb_common.transaction import Transaction
|
from bigchaindb_common.transaction import Transaction
|
||||||
|
|
||||||
|
|
||||||
tx = Transaction(Transaction.CREATE, [default_single_ffill], [default_single_cond])
|
tx = Transaction(Transaction.CREATE, [default_single_ffill], [default_single_cond])
|
||||||
expected = deepcopy(default_single_ffill)
|
expected = deepcopy(default_single_ffill)
|
||||||
expected.fulfillment.sign(str(tx), SigningKey(user_priv))
|
expected.fulfillment.sign(str(tx), SigningKey(user_priv))
|
||||||
@ -329,14 +330,14 @@ def test_invoke_simple_signature_fulfillment_with_invalid_parameters(utx, defaul
|
|||||||
|
|
||||||
|
|
||||||
def test_invoke_threshold_signature_fulfillment_with_invalid_parameters(utx, default_threshold_ffill, user3_pub,
|
def test_invoke_threshold_signature_fulfillment_with_invalid_parameters(utx, default_threshold_ffill, user3_pub,
|
||||||
user3_priv):
|
user3_priv, user_pub_keys):
|
||||||
from bigchaindb_common.exceptions import KeypairMismatchException
|
from bigchaindb_common.exceptions import KeypairMismatchException
|
||||||
|
|
||||||
|
with raises(KeypairMismatchException):
|
||||||
|
utx._sign_threshold_signature_fulfillment(default_threshold_ffill, 'somemessage', {user3_pub: user3_priv})
|
||||||
with raises(KeypairMismatchException):
|
with raises(KeypairMismatchException):
|
||||||
default_threshold_ffill.owners_before = ['somewrongvalue']
|
default_threshold_ffill.owners_before = ['somewrongvalue']
|
||||||
utx._sign_threshold_signature_fulfillment(default_threshold_ffill, 'somemessage', None)
|
utx._sign_threshold_signature_fulfillment(default_threshold_ffill, 'somemessage', None)
|
||||||
with raises(KeypairMismatchException):
|
|
||||||
utx._sign_threshold_signature_fulfillment(default_threshold_ffill, 'somemessage', [{user3_pub: user3_priv}])
|
|
||||||
|
|
||||||
|
|
||||||
def test_validate_fulfillment_with_invalid_parameters(utx):
|
def test_validate_fulfillment_with_invalid_parameters(utx):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user