From 9db8eecac1c713c760c0217b6acb7455c657fa8b Mon Sep 17 00:00:00 2001 From: John Newbery Date: Tue, 7 Feb 2017 09:56:53 -0500 Subject: Fix RPC failure testing Make sure that RPC tests are actually checking failures correctly by: - Catching JSON RPC exceptions and verifying the error codes and messages. - Failing the test case if the JSON RPC exception isn't raised. --- qa/rpc-tests/rpcnamedargs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qa/rpc-tests/rpcnamedargs.py') diff --git a/qa/rpc-tests/rpcnamedargs.py b/qa/rpc-tests/rpcnamedargs.py index 0484204668..da2d8f040f 100755 --- a/qa/rpc-tests/rpcnamedargs.py +++ b/qa/rpc-tests/rpcnamedargs.py @@ -37,7 +37,7 @@ class NamedArgumentTest(BitcoinTestFramework): h = node.help(command='getinfo') assert(h.startswith('getinfo\n')) - assert_raises_jsonrpc(-8, node.help, random='getinfo') + assert_raises_jsonrpc(-8, 'Unknown named parameter', node.help, random='getinfo') h = node.getblockhash(height=0) node.getblock(blockhash=h) -- cgit v1.2.3