From e5a8ea8f146393e2a5e7d73a49335f3670bada11 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Fri, 30 Nov 2018 17:49:03 -0500 Subject: [PATCH] [tests] tidy up imports in wallet_importmulti.py --- test/functional/wallet_importmulti.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/functional/wallet_importmulti.py b/test/functional/wallet_importmulti.py index 0e99a6b36..b6159063e 100755 --- a/test/functional/wallet_importmulti.py +++ b/test/functional/wallet_importmulti.py @@ -4,7 +4,13 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importmulti RPC.""" -from test_framework import script +from test_framework.messages import sha256 +from test_framework.script import ( + CScript, + OP_0, + OP_NOP, + hash160 +) from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, @@ -13,12 +19,6 @@ from test_framework.util import ( bytes_to_hex_str, hex_str_to_bytes ) -from test_framework.script import ( - CScript, - OP_0, - hash160 -) -from test_framework.messages import sha256 class ImportMultiTest(BitcoinTestFramework): def set_test_params(self): @@ -112,7 +112,7 @@ class ImportMultiTest(BitcoinTestFramework): # Nonstandard scriptPubKey + !internal self.log.info("Should not import a nonstandard scriptPubKey without internal flag") - nonstandardScriptPubKey = address['scriptPubKey'] + bytes_to_hex_str(script.CScript([script.OP_NOP])) + nonstandardScriptPubKey = address['scriptPubKey'] + bytes_to_hex_str(CScript([OP_NOP])) address = self.nodes[0].getaddressinfo(self.nodes[0].getnewaddress()) result = self.nodes[1].importmulti([{ "scriptPubKey": nonstandardScriptPubKey,