mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Fixed tests
This commit is contained in:
parent
d6759fa745
commit
0617cdd2e5
@ -26,7 +26,22 @@ def test_asset_invalid_asset_initialization():
|
|||||||
|
|
||||||
with raises(TypeError):
|
with raises(TypeError):
|
||||||
Asset(data='some wrong type')
|
Asset(data='some wrong type')
|
||||||
|
with raises(TypeError):
|
||||||
|
Asset(divisible=1)
|
||||||
|
with raises(TypeError):
|
||||||
|
Asset(refillable=1)
|
||||||
|
with raises(TypeError):
|
||||||
|
Asset(updatable=1)
|
||||||
|
|
||||||
|
# TODO: check where to test amount
|
||||||
|
"""
|
||||||
|
with pytest.raises(TypeError):
|
||||||
|
b.create_transaction(b.me, b.me, None, 'CREATE', amount='a')
|
||||||
|
with pytest.raises(AmountError):
|
||||||
|
b.create_transaction(b.me, b.me, None, 'CREATE', divisible=False, amount=2)
|
||||||
|
with pytest.raises(AmountError):
|
||||||
|
b.create_transaction(b.me, b.me, None, 'CREATE', amount=0)
|
||||||
|
"""
|
||||||
|
|
||||||
def test_invalid_asset_comparison(data, data_id):
|
def test_invalid_asset_comparison(data, data_id):
|
||||||
from bigchaindb_common.transaction import Asset
|
from bigchaindb_common.transaction import Asset
|
||||||
|
@ -1079,13 +1079,13 @@ def test_create_transfer_transaction_multiple_io(user_pub, user_priv,
|
|||||||
|
|
||||||
|
|
||||||
def test_create_transfer_with_invalid_parameters():
|
def test_create_transfer_with_invalid_parameters():
|
||||||
from bigchaindb_common.transaction import Transaction
|
from bigchaindb_common.transaction import Transaction, Asset
|
||||||
|
|
||||||
with raises(TypeError):
|
with raises(TypeError):
|
||||||
Transaction.transfer({}, [])
|
Transaction.transfer({}, [], Asset())
|
||||||
with raises(ValueError):
|
with raises(ValueError):
|
||||||
Transaction.transfer([], [])
|
Transaction.transfer([], [], Asset())
|
||||||
with raises(TypeError):
|
with raises(TypeError):
|
||||||
Transaction.transfer(['fulfillment'], {})
|
Transaction.transfer(['fulfillment'], {}, Asset())
|
||||||
with raises(ValueError):
|
with raises(ValueError):
|
||||||
Transaction.transfer(['fulfillment'], [])
|
Transaction.transfer(['fulfillment'], [], Asset())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user