move tx tests from test_models.py

This commit is contained in:
Scott Sadler 2017-03-14 16:18:08 +01:00
parent 66830fc1d9
commit 48a3ba96ae
2 changed files with 13 additions and 0 deletions

View File

@ -25,6 +25,14 @@ def validate_raises(tx):
validate(tx)
################################################################################
# Operation
def test_validate_invalid_operation(create_tx):
create_tx.operation = 'something invalid'
validate_raises(create_tx)
################################################################################
# Metadata
@ -58,6 +66,11 @@ def test_create_tx_no_asset_id(create_tx):
################################################################################
# Inputs
def test_no_inputs(create_tx):
create_tx.inputs = []
validate_raises(create_tx)
def test_create_single_input(create_tx):
tx = create_tx.to_dict()
tx['inputs'] += tx['inputs']