aboutsummaryrefslogtreecommitdiff
path: root/tests/functional_tests/wallet_address.py
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-25 10:59:46 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-11 11:08:09 +0000
commit2d68b31f3e58767c961a790dd51811d69798eac0 (patch)
treed7d840493af53f7803b76e04df2ef06d42ac21fd /tests/functional_tests/wallet_address.py
parentpython-rpc: add set_log_level and set_log_categories (diff)
downloadmonero-2d68b31f3e58767c961a790dd51811d69798eac0.tar.xz
functional_tests: add more wallet tests
get_transfer_by_txid, get_height, open/close
Diffstat (limited to 'tests/functional_tests/wallet_address.py')
-rwxr-xr-xtests/functional_tests/wallet_address.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/functional_tests/wallet_address.py b/tests/functional_tests/wallet_address.py
index 66a1633ca..4b2010019 100755
--- a/tests/functional_tests/wallet_address.py
+++ b/tests/functional_tests/wallet_address.py
@@ -45,6 +45,7 @@ class WalletAddressTest():
self.check_main_address()
self.check_keys()
self.create_subaddresses()
+ self.open_close()
def create(self):
print 'Creating wallet'
@@ -148,5 +149,33 @@ class WalletAddressTest():
res = wallet.get_address_index('82pP87g1Vkd3LUMssBCumk3MfyEsFqLAaGDf6oxddu61EgSFzt8gCwUD4tr3kp9TUfdPs2CnpD7xLZzyC1Ei9UsW3oyCWDf')
assert res.index == {'major': 1, 'minor': 0}
+ def open_close(self):
+ print 'Testing open/close'
+ wallet = Wallet()
+
+ res = wallet.get_address()
+ assert res.address == '42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm'
+
+ wallet.close_wallet()
+ ok = False
+ try: res = wallet.get_address()
+ except: ok = True
+ assert ok
+
+ wallet.restore_deterministic_wallet(seed = 'peeled mixture ionic radar utopia puddle buying illness nuns gadget river spout cavernous bounced paradise drunk looking cottage jump tequila melting went winter adjust spout')
+ res = wallet.get_address()
+ assert res.address == '44Kbx4sJ7JDRDV5aAhLJzQCjDz2ViLRduE3ijDZu3osWKBjMGkV1XPk4pfDUMqt1Aiezvephdqm6YD19GKFD9ZcXVUTp6BW'
+
+ wallet.close_wallet()
+ ok = False
+ try: wallet.get_address()
+ except: ok = True
+ assert ok
+
+ wallet.restore_deterministic_wallet(seed = 'velvet lymph giddy number token physics poetry unquoted nibs useful sabotage limits benches lifestyle eden nitrogen anvil fewest avoid batch vials washing fences goat unquoted')
+ res = wallet.get_address()
+ assert res.address == '42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm'
+
+
if __name__ == '__main__':
WalletAddressTest().run_test()