Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_importmulti.py
Show All 39 Lines | class ImportMultiTest(BitcoinTestFramework): | ||||
def skip_test_if_missing_module(self): | def skip_test_if_missing_module(self): | ||||
self.skip_if_no_wallet() | self.skip_if_no_wallet() | ||||
def setup_network(self, split=False): | def setup_network(self, split=False): | ||||
self.setup_nodes() | self.setup_nodes() | ||||
def test_importmulti(self, req, success, error_code=None, | def test_importmulti(self, req, success, error_code=None, | ||||
error_message=None, warnings=[]): | error_message=None, warnings=None): | ||||
"""Run importmulti and assert success""" | """Run importmulti and assert success""" | ||||
if warnings is None: | |||||
warnings = [] | |||||
result = self.nodes[1].importmulti([req]) | result = self.nodes[1].importmulti([req]) | ||||
observed_warnings = [] | observed_warnings = [] | ||||
if 'warnings' in result[0]: | if 'warnings' in result[0]: | ||||
observed_warnings = result[0]['warnings'] | observed_warnings = result[0]['warnings'] | ||||
assert_equal( | assert_equal( | ||||
"\n".join( | "\n".join( | ||||
sorted(warnings)), "\n".join( | sorted(warnings)), "\n".join( | ||||
sorted(observed_warnings))) | sorted(observed_warnings))) | ||||
▲ Show 20 Lines • Show All 686 Lines • Show Last 20 Lines |