15 lines
357 B
Python
15 lines
357 B
Python
from main import parse_args
|
|
|
|
|
|
def test_parse_args_defaults():
|
|
args = parse_args([])
|
|
assert args.days == 0
|
|
assert args.dry_run is False
|
|
assert args.xls is None
|
|
|
|
|
|
def test_parse_args_xls_dry_run():
|
|
args = parse_args(["--xls", "/tmp/orders.xls", "--dry-run"])
|
|
assert args.dry_run is True
|
|
assert str(args.xls).endswith("orders.xls")
|