more tests, splitting input handling and logic
This commit is contained in:
parent
afe9e18e0d
commit
46988352ca
4 changed files with 34 additions and 31 deletions
15
xexe/cli.py
15
xexe/cli.py
|
|
@ -66,7 +66,7 @@ def xe_healthcheck():
|
|||
"--currencies", default=",".join([]), show_default=True, type=click.STRING
|
||||
)
|
||||
@click.option("--dry-run", is_flag=True)
|
||||
@click.option("--output", type=click.STRING)
|
||||
@click.option("--output", type=click.STRING, required=True)
|
||||
def get_rates(
|
||||
start_date: Union[str, datetime.datetime, datetime.date],
|
||||
end_date: Union[str, datetime.datetime, datetime.date],
|
||||
|
|
@ -74,10 +74,11 @@ def get_rates(
|
|||
dry_run: bool,
|
||||
output: pathlib.Path,
|
||||
):
|
||||
handle_get_rates_inputs()
|
||||
handle_get_rates_inputs(
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
currencies=currencies,
|
||||
dry_run=dry_run,
|
||||
output=output,
|
||||
)
|
||||
run_get_rates()
|
||||
logger.debug(f"Received start_date: {start_date}")
|
||||
logger.debug(f"Received end_date: {end_date}")
|
||||
logger.debug(f"Received currencies: {currencies}")
|
||||
logger.debug(f"dry_run state: {dry_run}")
|
||||
logger.debug(f"Received output: {output}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue