diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-05-02 12:31:08 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-09-17 11:38:26 +0000 |
commit | 170e51f0d9802ba5e317f74706d1bb2ef97779e6 (patch) | |
tree | acadd6ec353b1eff9f8b38d90996566b57a967d9 /tests/functional_tests | |
parent | functional_tests: add wallet attributes test (diff) | |
download | monero-170e51f0d9802ba5e317f74706d1bb2ef97779e6.tar.xz |
functional_tests: add tx_notes tests
Diffstat (limited to 'tests/functional_tests')
-rwxr-xr-x | tests/functional_tests/transfer.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/functional_tests/transfer.py b/tests/functional_tests/transfer.py index ab1d6ccfe..03050bfbd 100755 --- a/tests/functional_tests/transfer.py +++ b/tests/functional_tests/transfer.py @@ -49,6 +49,7 @@ class TransferTest(): self.sweep_dust() self.sweep_single() self.check_destinations() + self.check_tx_notes() self.check_rescan() def reset(self): @@ -719,6 +720,23 @@ class TransferTest(): daemon.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', 1) self.wallet[0].refresh() + def check_tx_notes(self): + daemon = Daemon() + + print('Testing tx notes') + res = self.wallet[0].get_transfers() + assert len(res['in']) > 0 + in_txid = res['in'][0].txid + assert len(res['out']) > 0 + out_txid = res['out'][0].txid + res = self.wallet[0].get_tx_notes([in_txid, out_txid]) + assert res.notes == ['', ''] + res = self.wallet[0].set_tx_notes([in_txid, out_txid], ['in txid', 'out txid']) + res = self.wallet[0].get_tx_notes([in_txid, out_txid]) + assert res.notes == ['in txid', 'out txid'] + res = self.wallet[0].get_tx_notes([out_txid, in_txid]) + assert res.notes == ['out txid', 'in txid'] + def check_rescan(self): daemon = Daemon() |