aboutsummaryrefslogtreecommitdiff
path: root/tests/functional_tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-29 19:23:42 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-09-17 11:38:19 +0000
commit43015bb7e34322df28dad8718c3d06bac8cacf1c (patch)
treed3c8081b5efa2fa9c9d8646420ccf7872e68e9db /tests/functional_tests
parentfunctional_tests: add missing sweep_dust parameters, and test it (diff)
downloadmonero-43015bb7e34322df28dad8718c3d06bac8cacf1c.tar.xz
functional_tests: add get_transfers test
Diffstat (limited to 'tests/functional_tests')
-rwxr-xr-xtests/functional_tests/transfer.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/functional_tests/transfer.py b/tests/functional_tests/transfer.py
index 867ef8bd3..44898b68e 100755
--- a/tests/functional_tests/transfer.py
+++ b/tests/functional_tests/transfer.py
@@ -44,6 +44,7 @@ class TransferTest():
self.mine()
self.transfer()
self.check_get_bulk_payments()
+ self.check_get_payments()
self.check_double_spend_detection()
self.sweep_dust()
self.sweep_single()
@@ -524,6 +525,28 @@ class TransferTest():
res = self.wallet[1].get_bulk_payments(["1111111122222222"])
assert len(res.payments) >= 1 # we have one of these
+ def check_get_payments(self):
+ print('Checking get_payments')
+
+ daemon = Daemon()
+ res = daemon.get_info()
+ height = res.height
+
+ self.wallet[0].refresh()
+ self.wallet[1].refresh()
+
+ res = self.wallet[0].get_payments('1234500000012345abcde00000abcdeff1234500000012345abcde00000abcde')
+ assert 'payments' not in res or len(res.payments) == 0
+
+ res = self.wallet[1].get_payments('1234500000012345abcde00000abcdeff1234500000012345abcde00000abcde')
+ assert len(res.payments) >= 2
+
+ res = self.wallet[1].get_payments('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')
+ assert 'payments' not in res or len(res.payments) == 0
+
+ res = self.wallet[1].get_payments(payment_id = '1111111122222222' + '0'*48)
+ assert len(res.payments) >= 1 # one tx to integrated address
+
def check_double_spend_detection(self):
print('Checking double spend detection')
txes = [[None, None], [None, None]]