diff options
author | John Newbery <john@johnnewbery.com> | 2017-07-12 10:29:02 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-10-05 09:48:46 -0400 |
commit | 5864e9c1611e6034a8d49b78231abe6bfade686d (patch) | |
tree | e8cec4a64d53873002d7ab327e2cd026802bc49e /test/functional/segwit.py | |
parent | e93fff1463ae906fc986bf98c3b118c82f171546 (diff) |
[tests] remove direct testing on JSONRPCException from individual test cases
Diffstat (limited to 'test/functional/segwit.py')
-rwxr-xr-x | test/functional/segwit.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/functional/segwit.py b/test/functional/segwit.py index de5c8c6c87..3fcbaa4fa6 100755 --- a/test/functional/segwit.py +++ b/test/functional/segwit.py @@ -452,11 +452,7 @@ class SegWitTest(BitcoinTestFramework): for i in importlist: # import all generated addresses. The wallet already has the private keys for some of these, so catch JSON RPC # exceptions and continue. - try: - self.nodes[0].importaddress(i,"",False,True) - except JSONRPCException as exp: - assert_equal(exp.error["message"], "The wallet already contains the private key for this address or script") - assert_equal(exp.error["code"], -4) + try_rpc(-4, "The wallet already contains the private key for this address or script", self.nodes[0].importaddress, i, "", False, True) self.nodes[0].importaddress(script_to_p2sh(op0)) # import OP_0 as address only self.nodes[0].importaddress(multisig_without_privkey_address) # Test multisig_without_privkey |