forked from steemit/steem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a85a7ce
commit e1dacd0
Showing
6 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
..._scripts/tests/cli_wallet/tests/009_list_voter_proposal_fail_invalid_value_for_last_id.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/python3 | ||
|
||
from utils.test_utils import * | ||
from utils.cmd_args import args | ||
from utils.cli_wallet import CliWallet | ||
from utils.logger import log, init_logger | ||
|
||
if __name__ == "__main__": | ||
try: | ||
init_logger(__file__) | ||
error = False | ||
wallet = CliWallet( args.path, | ||
args.server_rpc_endpoint, | ||
args.cert_auth, | ||
args.rpc_tls_endpoint, | ||
args.rpc_tls_cert, | ||
args.rpc_http_endpoint, | ||
args.deamon, | ||
args.rpc_allowip, | ||
args.wallet_file, | ||
args.chain_id ) | ||
wallet.set_and_run_wallet() | ||
|
||
error_msg_x = "The value `x` for `_last_id` argument is invalid, it should be integer type." | ||
resp_error_x = wallet.list_voter_proposals(args.creator, "creator", "asc", 50, "all", "x") | ||
log.info(resp_error_x) | ||
if resp_error_x.find(error_msg_x) == -1: | ||
raise ArgsCheckException("Assertion `{0}` is required.".format(error_msg_x)) | ||
|
||
error_msg_y = "The value `y` for `_last_id` argument is invalid, it should be integer type." | ||
resp_error_y = wallet.list_voter_proposals(args.creator, "creator", "asc", 50, "all", "y") | ||
log.info(resp_error_y) | ||
if resp_error_y.find(error_msg_y) == -1: | ||
raise ArgsCheckException("Assertion `{0}` is required.".format(error_msg_y)) | ||
|
||
error_msg_10 = "The value `10` for `_last_id` argument is invalid, it should be integer type." | ||
resp_10 = wallet.list_voter_proposals(args.creator, "creator", "asc", 50, "all", "10") | ||
log.info(resp_10) | ||
if resp_10.find(error_msg_10) != -1: | ||
raise ArgsCheckException("There should be no assertion `{0}`.".format(error_msg_10)) | ||
if not "result" in last_message_as_json(resp_10): | ||
raise ArgsCheckException("No `result` in response") | ||
|
||
|
||
except Exception as _ex: | ||
log.exception(str(_ex)) | ||
error = True | ||
finally: | ||
if error: | ||
log.error("TEST `{0}` failed".format(__file__)) | ||
exit(1) | ||
else: | ||
log.info("TEST `{0}` passed".format(__file__)) | ||
exit(0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters