From 860e7cda02614833a3fc7e7ed178fb2059de136d Mon Sep 17 00:00:00 2001 From: Scott Sadler Date: Wed, 15 Mar 2017 14:32:54 +0100 Subject: [PATCH] test that transaction with no hash raises schema validation error --- tests/validation/test_transaction_structure.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/validation/test_transaction_structure.py b/tests/validation/test_transaction_structure.py index 63063f7f..df79f594 100644 --- a/tests/validation/test_transaction_structure.py +++ b/tests/validation/test_transaction_structure.py @@ -51,6 +51,12 @@ def test_tx_serialization_with_incorrect_hash(create_tx): validate_raises(tx, InvalidHash) +def test_tx_serialization_with_no_hash(create_tx): + tx = create_tx.to_dict() + del tx['id'] + validate_raises(tx) + + ################################################################################ # Operation