aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/getblocktemplate_proposals.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2015-11-15 20:41:48 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-03-19 19:07:08 +0100
commitfab3890156c849e6b04309152d7a9bfcfcb98396 (patch)
tree6cf00c0c901bcb234d7f665ada028cce39d2199a /qa/rpc-tests/getblocktemplate_proposals.py
parent29e1131c4642459349a0ed4737121fb1902f8a47 (diff)
downloadbitcoin-fab3890156c849e6b04309152d7a9bfcfcb98396.tar.xz
[qa] rpc-test: Normalize assert()
Diffstat (limited to 'qa/rpc-tests/getblocktemplate_proposals.py')
-rwxr-xr-xqa/rpc-tests/getblocktemplate_proposals.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/qa/rpc-tests/getblocktemplate_proposals.py b/qa/rpc-tests/getblocktemplate_proposals.py
index f83b5f140d..d2cb4ab8d6 100755
--- a/qa/rpc-tests/getblocktemplate_proposals.py
+++ b/qa/rpc-tests/getblocktemplate_proposals.py
@@ -120,10 +120,7 @@ class GetBlockTemplateProposalTest(BitcoinTestFramework):
# Test 3: Truncated final tx
lastbyte = txlist[-1].pop()
- try:
- assert_template(node, tmpl, txlist, 'n/a')
- except JSONRPCException:
- pass # Expected
+ assert_raises(JSONRPCException, assert_template, node, tmpl, txlist, 'n/a')
txlist[-1].append(lastbyte)
# Test 4: Add an invalid tx to the end (duplicate of gen tx)
@@ -144,10 +141,7 @@ class GetBlockTemplateProposalTest(BitcoinTestFramework):
# Test 7: Bad tx count
txlist.append(b'')
- try:
- assert_template(node, tmpl, txlist, 'n/a')
- except JSONRPCException:
- pass # Expected
+ assert_raises(JSONRPCException, assert_template, node, tmpl, txlist, 'n/a')
txlist.pop()
# Test 8: Bad bits