0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05:00

test: added coverage to rpc_scantxoutset.py

Included a test that checks if an invalid first argument is entered we
receive a rpc error. The rpc should fail if "start", "status" or "abort"
is not the first command.
This commit is contained in:
kevkevin 2023-04-12 10:54:32 -05:00
parent 7f4ab67e7b
commit 24d55fb9cf
No known key found for this signature in database
GPG key ID: B4346A15246A925D

View file

@ -123,6 +123,9 @@ class ScantxoutsetTest(BitcoinTestFramework):
# Check that second arg is needed for start
assert_raises_rpc_error(-1, "scanobjects argument is required for the start action", self.nodes[0].scantxoutset, "start")
# Check that invalid command give error
assert_raises_rpc_error(-8, "Invalid action 'invalid_command'", self.nodes[0].scantxoutset, "invalid_command")
if __name__ == "__main__":
ScantxoutsetTest().main()