Skip to content

Commit

Permalink
Add more tests for accounthistorycount
Browse files Browse the repository at this point in the history
  • Loading branch information
shohamc1 committed Jan 14, 2023
1 parent 7b1dd76 commit fb703dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/functional/rpc_listaccounthistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,16 @@ def run_test(self):
self.nodes[0].listaccounthistory(collateral_a, {"txtype": "BurnToken"}) +
self.nodes[0].listaccounthistory(collateral_a, {"txtype": "MintToken"}))

assert_equal(len(self.nodes[0].listaccounthistory(collateral_a, {"txtypes": ["MintToken", "BurnToken"]})),
self.nodes[0].accounthistorycount(collateral_a, {"txtypes": ["MintToken", "BurnToken"]}))

# txtype should be ignored if txtypes is passed
assert_equal(self.nodes[0].listaccounthistory(collateral_a, {"txtypes": ["MintToken", "BurnToken"]}),
self.nodes[0].listaccounthistory(collateral_a, {"txtype": "BurnToken", "txtypes": ["MintToken",
"BurnToken"]}))
assert_equal(self.nodes[0].accounthistorycount(collateral_a, {"txtypes": ["MintToken", "BurnToken"]}),
self.nodes[0].accounthistorycount(collateral_a, {"txtype": "BurnToken", "txtypes": ["MintToken",
"BurnToken"]}))

# test pagination
res0 = self.nodes[0].listaccounthistory(collateral_a, {"start": 0, "including_start": True})
Expand Down

0 comments on commit fb703dc

Please sign in to comment.