test: fix importmulti/importdescriptors assertion

as these RPCs have a "warnings" field, not a "warning" one.
This commit is contained in:
Jon Atack 2023-03-29 17:51:44 -07:00
parent 19d888ce40
commit 7ccdd741fe

View File

@ -60,7 +60,7 @@ class CreateWalletTest(BitcoinTestFramework):
else:
result = w1.importmulti([{'scriptPubKey': {'address': key_to_p2wpkh(eckey.get_pubkey().get_bytes())}, 'timestamp': 'now', 'keys': [privkey]}])
assert not result[0]['success']
assert 'warning' not in result[0]
assert 'warnings' not in result[0]
assert_equal(result[0]['error']['code'], -4)
assert_equal(result[0]['error']['message'], 'Cannot import private keys to a wallet with private keys disabled')