[tests] Remove ‘account’ API from wallet functional tests #13075

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:remove_functional_tests_accounts changing 8 files +78 −126
  1. jnewbery commented at 8:06 pm on April 25, 2018: member

    Next step in #12952. Removes all usage of the ‘account’ API from the wallet functional tests, except:

    • rpc_deprecated.py (which specifically tests the -deprecatedrpc=accounts command line argument is working properly).
    • wallet_labels.py (which tests that both the ’label’ and ‘account’ APIs work in V0.17).

    ‘account’ API usage for both of those tests can be removed once V0.17 has been branched.

    Also excluded is:

    • wallet_importprunedfunds.py (which fails due to a bitcoind OOM error)
  2. jnewbery force-pushed on Apr 25, 2018
  3. laanwj commented at 8:26 am on April 26, 2018: member
    Nice! Concept ACK.
  4. jonasschnelli commented at 8:29 am on April 26, 2018: contributor
    Concept ACK. I think combining some commits (especially the flake8 fixes) would help in review.
  5. laanwj commented at 2:01 pm on May 1, 2018: member

    This currently fails Travis due to an OOM issue exposed by wallet_importprunedfunds.py

    Ref: this issue is tracked in #13078, and so this PR depends on that being fixed

  6. laanwj added the label Tests on May 1, 2018
  7. jnewbery renamed this:
    Remove 'account' API from wallet functional tests
    [Don't merge yet] Remove 'account' API from wallet functional tests
    on May 1, 2018
  8. jnewbery force-pushed on May 1, 2018
  9. jnewbery commented at 3:13 pm on May 1, 2018: member
    I’ve squashed all the flake8 fixes into a single commit as requested by @jonasschnelli , and opened a PR for just those fixes at #13136.
  10. jnewbery force-pushed on May 1, 2018
  11. MarcoFalke referenced this in commit baf6b4e3f9 on May 1, 2018
  12. jnewbery force-pushed on May 1, 2018
  13. jnewbery force-pushed on May 1, 2018
  14. jnewbery renamed this:
    [Don't merge yet] Remove 'account' API from wallet functional tests
    [tests] Remove 'account' API from wallet functional tests
    on May 1, 2018
  15. jnewbery commented at 7:24 pm on May 1, 2018: member
    • Rebased on master (to pick up the flake8 fixes)
    • Moved the wallet_importprunedfunds.py change to a separate PR (since it exposes a bitcoind OOM error)
    • Squashed all remaining commits.

    Should be a fairly straightforward review.

  16. MarcoFalke commented at 8:34 pm on May 1, 2018: member
    tests fail on travis
  17. jnewbery force-pushed on May 1, 2018
  18. jnewbery commented at 9:01 pm on May 1, 2018: member
    Thanks @MarcoFalke . Should now be fixed.
  19. sipa commented at 10:07 pm on May 1, 2018: member
    Concept ACK
  20. in test/functional/wallet_keypool_topup.py:28 in 6b7a4ea7e9 outdated
    24@@ -25,7 +25,7 @@ class KeypoolRestoreTest(BitcoinTestFramework):
    25     def set_test_params(self):
    26         self.setup_clean_chain = True
    27         self.num_nodes = 2
    28-        self.extra_args = [['-deprecatedrpc=accounts'], ['-deprecatedrpc=accounts', '-keypool=100', '-keypoolmin=20']]
    29+        self.extra_args = [[], ['-keypool=100', '-keypoolmin=20']]
    


    MarcoFalke commented at 11:25 pm on May 1, 2018:
    What does keypoolmin do?

    MarcoFalke commented at 0:05 am on May 2, 2018:
    Looks like this was added in d34957e17e8c9740104533aaf4a896e93548c87e and it is fine to just remove.

    jnewbery commented at 9:53 pm on May 2, 2018:
    removed
  21. in test/functional/wallet_listtransactions.py:98 in 6b7a4ea7e9 outdated
    100-        assert(len(self.nodes[0].listtransactions("watchonly", 100, 0, False)) == 0)
    101-        assert_array_result(self.nodes[0].listtransactions("watchonly", 100, 0, True),
    102-                            {"category": "receive", "amount": Decimal("0.1")},
    103-                            {"txid": txid, "account": "watchonly"})
    104+        assert not [tx for tx in self.nodes[0].listtransactions("*", 100, 0, False) if "label" in tx and tx["label"] == "watchonly"]
    105+        txs = [tx for tx in self.nodes[0].listtransactions("*", 100, 0, True) if "label" in tx and tx['label'] == 'watchonly']
    


    MarcoFalke commented at 11:28 pm on May 1, 2018:
    nit: Could use named args for those True and False?

    jnewbery commented at 9:54 pm on May 2, 2018:
    You can’t mix positional and named args, so I’ve named them all.
  22. MarcoFalke commented at 11:32 pm on May 1, 2018: member
    utACK 6b7a4ea7e9929d0ad65c7caf822f44ab6c01a475. Some style nits/questions.
  23. meshcollider commented at 9:14 am on May 2, 2018: contributor
    Concept ACK
  24. [tests] Remove 'account' API from wallet functional tests
    Removes usage of account API from the following functional tests:
    
    - wallet_listreceivedby.py
    - wallet_basic.py
    - wallet_keypool_topup.py
    - wallet_txn_clone.py
    - wallet_listsinceblock.py
    - wallet_import_rescan.py
    - wallet_listtransactions.py
    - wallet_txn_doublespend.py
    5d536619ab
  25. jnewbery force-pushed on May 2, 2018
  26. jnewbery commented at 9:55 pm on May 2, 2018: member

    Thanks for the reviews. I’ve addressed @MarcoFalke ’s comments.

     0→ git diff 6b7a4ea7e9929d0ad65c7caf822f44ab6c01a475 5d536619abda745c298fd827a856df775f223241
     1diff --git a/test/functional/wallet_keypool_topup.py b/test/functional/wallet_keypool_topup.py
     2index 30a0c9a76..d657dc30c 100755
     3--- a/test/functional/wallet_keypool_topup.py
     4+++ b/test/functional/wallet_keypool_topup.py
     5@@ -25,7 +25,7 @@ class KeypoolRestoreTest(BitcoinTestFramework):
     6     def set_test_params(self):
     7         self.setup_clean_chain = True
     8         self.num_nodes = 2
     9-        self.extra_args = [[], ['-keypool=100', '-keypoolmin=20']]
    10+        self.extra_args = [[], ['-keypool=100']]
    11 
    12     def run_test(self):
    13         wallet_path = os.path.join(self.nodes[1].datadir, "regtest", "wallets", "wallet.dat")
    14diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py
    15index 3de65b9b5..7cf2e456c 100755
    16--- a/test/functional/wallet_listtransactions.py
    17+++ b/test/functional/wallet_listtransactions.py
    18@@ -94,8 +94,8 @@ class ListTransactionsTest(BitcoinTestFramework):
    19         txid = self.nodes[1].sendtoaddress(multisig["address"], 0.1)
    20         self.nodes[1].generate(1)
    21         self.sync_all()
    22-        assert not [tx for tx in self.nodes[0].listtransactions("*", 100, 0, False) if "label" in tx and tx["label"] == "watchonly"]
    23-        txs = [tx for tx in self.nodes[0].listtransactions("*", 100, 0, True) if "label" in tx and tx['label'] == 'watchonly']
    24+        assert not [tx for tx in self.nodes[0].listtransactions(dummy="*", count=100, skip=0, include_watchonly=False) if "label" in tx and tx["label"] == "watchonly"]
    25+        txs = [tx for tx in self.nodes[0].listtransactions(dummy="*", count=100, skip=0, include_watchonly=True) if "label" in tx and tx['label'] == 'watchonly']
    26         assert_array_result(txs, {"category": "receive", "amount": Decimal("0.1")}, {"txid": txid})
    27 
    28         self.run_rbf_opt_in_test()
    
  27. MarcoFalke merged this on May 10, 2018
  28. MarcoFalke closed this on May 10, 2018

  29. MarcoFalke referenced this in commit cb9bbf7772 on May 10, 2018
  30. jnewbery deleted the branch on May 14, 2018
  31. MarcoFalke referenced this in commit 8803c9132a on Jul 14, 2018
  32. ryanofsky referenced this in commit 8fcb765084 on Oct 6, 2018
  33. jnewbery referenced this in commit c8d1f1513f on Oct 9, 2018
  34. ryanofsky referenced this in commit fa7fae5c36 on Oct 10, 2018
  35. ryanofsky referenced this in commit 4deba4ced9 on Oct 10, 2018
  36. jnewbery referenced this in commit 89306ab0df on Oct 10, 2018
  37. ryanofsky referenced this in commit 7cbe74f152 on Oct 15, 2018
  38. laanwj referenced this in commit 5150accdd2 on Nov 10, 2018
  39. ryanofsky referenced this in commit b6ccb77270 on Nov 12, 2018
  40. ryanofsky referenced this in commit 3f05bcbf5d on Nov 13, 2018
  41. ryanofsky referenced this in commit 65b740f92b on Nov 13, 2018
  42. MarcoFalke referenced this in commit e74649e951 on Nov 14, 2018
  43. JeremyRubin referenced this in commit 19581b0f3f on Nov 24, 2018
  44. HashUnlimited referenced this in commit 2d9f1046e7 on Nov 26, 2018
  45. PastaPastaPasta referenced this in commit ffe575a9fd on Jul 19, 2020
  46. PastaPastaPasta referenced this in commit 5a1ca94063 on Jul 24, 2020
  47. PastaPastaPasta referenced this in commit f8fb77abc5 on Jul 27, 2020
  48. UdjinM6 referenced this in commit 24cc9b89a2 on Jul 27, 2020
  49. UdjinM6 referenced this in commit 72a56e3118 on Jul 27, 2020
  50. xdustinface referenced this in commit 2bdbc5b70f on Dec 18, 2020
  51. xdustinface referenced this in commit d43ffc6fba on Dec 18, 2020
  52. xdustinface referenced this in commit 7f9343446a on Dec 18, 2020
  53. xdustinface referenced this in commit 02e4b5b5b5 on Dec 22, 2020
  54. xdustinface referenced this in commit de7c6514a3 on Dec 22, 2020
  55. xdustinface referenced this in commit 42a98b0bc8 on Dec 22, 2020
  56. xdustinface referenced this in commit 96d306324f on Dec 22, 2020
  57. UdjinM6 referenced this in commit 3d55b81198 on May 21, 2021
  58. UdjinM6 referenced this in commit f1ec546b35 on May 25, 2021
  59. TheArbitrator referenced this in commit 3a58e04762 on Jun 4, 2021
  60. PastaPastaPasta referenced this in commit 3dad55fc4c on Jun 27, 2021
  61. PastaPastaPasta referenced this in commit 9ce89a7114 on Jun 28, 2021
  62. PastaPastaPasta referenced this in commit afd1189c69 on Jun 28, 2021
  63. PastaPastaPasta referenced this in commit d9eb5242e1 on Jun 28, 2021
  64. PastaPastaPasta referenced this in commit 526b4ede3a on Jun 28, 2021
  65. PastaPastaPasta referenced this in commit 15a65ab407 on Jun 29, 2021
  66. UdjinM6 referenced this in commit b25d608471 on Aug 7, 2021
  67. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me