edq.cli.http.verify-exchanges
Verify that exchanges sent to a given server have the same response.
1# pylint: disable=invalid-name 2 3""" 4Verify that exchanges sent to a given server have the same response. 5""" 6 7import argparse 8import sys 9 10import edq.core.argparser 11import edq.procedure.verify_exchanges 12 13def run_cli(args: argparse.Namespace) -> int: 14 """ Run the CLI. """ 15 16 return edq.procedure.verify_exchanges.run(args.paths, args.server) 17 18def main() -> int: 19 """ Get a parser, parse the args, and call run. """ 20 return run_cli(_get_parser().parse_args()) 21 22def _get_parser() -> argparse.ArgumentParser: 23 """ Get the parser. """ 24 25 parser = edq.core.argparser.get_default_parser(__doc__.strip()) 26 27 parser.add_argument('server', metavar = 'SERVER', 28 action = 'store', type = str, default = None, 29 help = 'Address of the server to send exchanges to.') 30 31 parser.add_argument('paths', metavar = 'PATH', 32 type = str, nargs = '+', 33 help = 'Path to exchange files or dirs (which will be recursively searched for all exchange files).') 34 35 return parser 36 37if (__name__ == '__main__'): 38 sys.exit(main())
def
run_cli(args: argparse.Namespace) -> int:
14def run_cli(args: argparse.Namespace) -> int: 15 """ Run the CLI. """ 16 17 return edq.procedure.verify_exchanges.run(args.paths, args.server)
Run the CLI.
def
main() -> int:
19def main() -> int: 20 """ Get a parser, parse the args, and call run. """ 21 return run_cli(_get_parser().parse_args())
Get a parser, parse the args, and call run.