Skip to content

Commit f65bce8

Browse files
author
MarcoFalke
committed
Merge #14886: [tests] Refactor importmulti tests
ee3b21d [tests] Add docstring for wallet_importmulti.py (John Newbery) fbdba40 [tests] add test_address method to wallet_import.py (John Newbery) fd3a02c [tests] add test_importmulti method to wallet_import.py (John Newbery) 08a4a0f [tests] add get_multisig function to wallet_importmulti.py (John Newbery) 7c99614 [tests] add get_key function to wallet_importmulti.py (John Newbery) e5a8ea8 [tests] tidy up imports in wallet_importmulti.py (John Newbery) cb41ade [tests] fix flake8 warnings in wallet_importmulti.py (John Newbery) Pull request description: bitcoin/bitcoin#14565 needs test coverage. This PR refactors wallet_importmulti.py to the following pattern: 1. Add `get_key()` and `get_multisig()` methods, which generate keys on node0 and return the priv/pubkeys and all scriptPubKey and address variants. 2. Add `test_importmulti()` method, which takes an importmulti request, sends it to node1 and tests against success and error codes/messages. 3. Add `test_address()` method, which takes an address, sends it as a getaddressinfo request to node1 and tests the values returned. This does not add any specific testing for #14565, but makes it very straightforward to add that testing: `test_importmulti()` can be easily updated to test for returned warnings, and `test_address()` can be called multiple times against the different address variants for a singlesig/multisig. Tree-SHA512: e0ae9d3436f0b4eec4f6b9bdc0f02aef49c5a16bbac319fd47b2cfcaf01d01780d7b296280e8760686a57fac63275eec09e2959d8aaeceae1b406d8eff768435
2 parents 7701b62 + ee3b21d commit f65bce8

File tree

1 file changed

+440
-462
lines changed

1 file changed

+440
-462
lines changed

0 commit comments

Comments
 (0)