functional_tests: add wallet password change, store and tag tests

This commit is contained in:
moneromooo-monero 2019-04-29 21:44:01 +00:00
parent 8e077a5fc0
commit 0dc49fc918
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
3 changed files with 249 additions and 9 deletions

View file

@ -350,6 +350,34 @@ class Wallet(object):
}
return self.rpc.send_json_rpc_request(close_wallet)
def change_wallet_password(self, old_password, new_password):
change_wallet_password = {
'method': 'change_wallet_password',
'params' : {
'old_password': old_password,
'new_password': new_password,
},
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(change_wallet_password)
def store(self):
store = {
'method': 'store',
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(store)
def stop_wallet(self):
stop_wallet = {
'method': 'stop_wallet',
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(stop_wallet)
def refresh(self):
refresh = {
'method': 'refresh',
@ -806,6 +834,62 @@ class Wallet(object):
}
return self.rpc.send_json_rpc_request(validate_address)
def get_accounts(self, tag):
get_accounts = {
'method': 'get_accounts',
'params': {
'tag': tag,
},
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(get_accounts)
def get_account_tags(self):
get_account_tags = {
'method': 'get_account_tags',
'params': {
},
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(get_account_tags)
def tag_accounts(self, tag, accounts = []):
tag_accounts = {
'method': 'tag_accounts',
'params': {
'tag': tag,
'accounts': accounts,
},
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(tag_accounts)
def untag_accounts(self, accounts = []):
untag_accounts = {
'method': 'untag_accounts',
'params': {
'accounts': accounts,
},
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(untag_accounts)
def set_account_tag_description(self, tag, description):
set_account_tag_description = {
'method': 'set_account_tag_description',
'params': {
'tag': tag,
'description': description,
},
'jsonrpc': '2.0',
'id': '0'
}
return self.rpc.send_json_rpc_request(set_account_tag_description)
def start_mining(self, threads_count, do_background_mining = False, ignore_battery = False):
start_mining = {
'method': 'start_mining',