mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-21 17:59:55 +00:00
add shell and version parser
This commit is contained in:
@ -492,6 +492,15 @@ def test_subparsers_repo_update_architecture(parser: argparse.ArgumentParser) ->
|
||||
assert args.architecture == ["x86_64"]
|
||||
|
||||
|
||||
def test_subparsers_shell(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
shell command must imply lock and no-report
|
||||
"""
|
||||
args = parser.parse_args(["shell"])
|
||||
assert args.lock is None
|
||||
assert args.no_report
|
||||
|
||||
|
||||
def test_subparsers_user_add(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
user-add command must imply action, architecture, lock, no-report, quiet and unsafe
|
||||
@ -575,6 +584,26 @@ def test_subparsers_user_remove_architecture(parser: argparse.ArgumentParser) ->
|
||||
assert args.architecture == [""]
|
||||
|
||||
|
||||
def test_subparsers_version(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
version command must imply architecture, lock, no-report, quiet and unsafe
|
||||
"""
|
||||
args = parser.parse_args(["version"])
|
||||
assert args.architecture == [""]
|
||||
assert args.lock is None
|
||||
assert args.no_report
|
||||
assert args.quiet
|
||||
assert args.unsafe
|
||||
|
||||
|
||||
def test_subparsers_version_architecture(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
version command must correctly parse architecture list
|
||||
"""
|
||||
args = parser.parse_args(["-a", "x86_64", "version"])
|
||||
assert args.architecture == [""]
|
||||
|
||||
|
||||
def test_subparsers_web(parser: argparse.ArgumentParser) -> None:
|
||||
"""
|
||||
web command must imply lock, no_report and parser
|
||||
|
Reference in New Issue
Block a user