pytest: create proper mock failures.

We actually produce an invalid JSON error at the moment: bitcoin-cli
complains "JSON value is not an integer as expected" rather than returning
the given error.  Make our error a valid JSON RPC error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-01-23 12:06:50 +10:30
parent 27b66997da
commit 2d7c1ed0cf
2 changed files with 2 additions and 1 deletions

View File

@@ -56,6 +56,7 @@ class BitcoinRpcProxy(object):
except JSONRPCError as e:
reply = {
"error": e.error,
"code": -32603,
"id": r['id']
}
self.request_count += 1