#14565 needs test coverage. This PR refactors wallet_importmulti.py to the following pattern:
- Add
get_key()andget_multisig()methods, which generate keys on node0 and return the priv/pubkeys and all scriptPubKey and address variants. - Add
test_importmulti()method, which takes an importmulti request, sends it to node1 and tests against success and error codes/messages. - 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.