aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/blockchain.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-03-16 11:57:09 +0100
committerMarcoFalke <falke.marco@gmail.com>2017-03-16 11:57:18 +0100
commit598ef9c44b3ea2cc142c175f077b493f39f5ba22 (patch)
tree84bf5607dad6b8b81ca0f0bc253b556b845f72f3 /qa/rpc-tests/blockchain.py
parentc49355c7170a64bdd7864cc3ba9a64916b67fe7c (diff)
parentc9bd0f64212cd600daf30c9c59035bfe9f07b81b (diff)
Merge #9842: Fix RPC failure testing (continuation of #9707)
c9bd0f6 Fix RPC failure testing (2 of 2) (John Newbery) Tree-SHA512: df30e6e85abe8c4e12910dc60699f1201e9c243457abd738c1fdeac45f0ff05c674f68619ad9a47c847ec557954007d672cd89d3a9a3b2398dd188d9ffa6dcc9
Diffstat (limited to 'qa/rpc-tests/blockchain.py')
-rwxr-xr-xqa/rpc-tests/blockchain.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/qa/rpc-tests/blockchain.py b/qa/rpc-tests/blockchain.py
index 67b5826840..596aed50ec 100755
--- a/qa/rpc-tests/blockchain.py
+++ b/qa/rpc-tests/blockchain.py
@@ -14,10 +14,9 @@ Tests correspond to code in rpc/blockchain.cpp.
from decimal import Decimal
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.authproxy import JSONRPCException
from test_framework.util import (
assert_equal,
- assert_raises,
+ assert_raises_jsonrpc,
assert_is_hex_string,
assert_is_hash_string,
start_nodes,
@@ -58,8 +57,7 @@ class BlockchainTest(BitcoinTestFramework):
def _test_getblockheader(self):
node = self.nodes[0]
- assert_raises(
- JSONRPCException, lambda: node.getblockheader('nonsense'))
+ assert_raises_jsonrpc(-5, "Block not found", node.getblockheader, "nonsense")
besthash = node.getbestblockhash()
secondbesthash = node.getblockhash(199)