2026-10-05 09:41:22 +02:00
|
|
|
# retoor <retoor@molodetz.nl>
|
|
|
|
|
from molodetz.cli.main import build_parser
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_parser_groups():
|
|
|
|
|
parser = build_parser()
|
2026-10-05 11:25:41 +02:00
|
|
|
args = parser.parse_args(["posts", "import", "note.md", "--topic", "standard"])
|
|
|
|
|
assert args.topic == "standard" and args.path == "note.md"
|
2026-10-05 09:41:22 +02:00
|
|
|
args = parser.parse_args(["system", "prune", "--dry-run"])
|
|
|
|
|
assert args.dry_run is True
|
|
|
|
|
args = parser.parse_args(["role", "set", "retoor", "Admin"])
|
|
|
|
|
assert args.role == "Admin"
|