From 626141987ef18959ee7063d6872fadcf1c5d4869 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Sat, 26 Nov 2022 16:07:14 +0100 Subject: [PATCH] Rename revocation save cmd to revocation create (#430) --- silkaj/cli.py | 2 +- silkaj/wot/revocation.py | 4 ++-- tests/unit/wot/test_revocation.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/silkaj/cli.py b/silkaj/cli.py index e5dbd10c..7663c1ba 100644 --- a/silkaj/cli.py +++ b/silkaj/cli.py @@ -175,7 +175,7 @@ def revocation_group() -> None: pass -revocation_group.add_command(revocation.save) +revocation_group.add_command(revocation.create) revocation_group.add_command(revocation.verify) revocation_group.add_command(revocation.publish) revocation_group.add_command(revocation.revoke_now) diff --git a/silkaj/wot/revocation.py b/silkaj/wot/revocation.py index f09110bc..4bbb0bce 100644 --- a/silkaj/wot/revocation.py +++ b/silkaj/wot/revocation.py @@ -37,7 +37,7 @@ REVOCATION_LOCAL_PATH = "revocation.txt" @click.command( - "save", + "create", help="Create and save a revocation document. Optionnaly takes the document filename.", ) @click.argument( @@ -45,7 +45,7 @@ REVOCATION_LOCAL_PATH = "revocation.txt" default=REVOCATION_LOCAL_PATH, ) @click.pass_context -def save(ctx: click.Context, file: str) -> None: +def create(ctx: click.Context, file: str) -> None: currency = get_currency() key = auth.auth_method() diff --git a/tests/unit/wot/test_revocation.py b/tests/unit/wot/test_revocation.py index 19097807..eeeb7df7 100644 --- a/tests/unit/wot/test_revocation.py +++ b/tests/unit/wot/test_revocation.py @@ -144,7 +144,7 @@ def patched_send_bma_revoke_error(wot_useless, rev_doc_useless): "subcommand, expected_warn", [ ( - "save", + "create", False, ), ( @@ -194,7 +194,7 @@ def test_revocation_cli_dry_run(subcommand, expected_warn, monkeypatch): assert warning not in result.output -# test cli save +# test cli create @pytest.mark.parametrize( "display, dry_run, file, user_input, expected", [ @@ -298,7 +298,7 @@ def test_revocation_cli_save(display, dry_run, file, user_input, expected, monke ) command = display_dry_options(display, dry_run) - subcommand = ["wot", "revocation", "save"] + subcommand = ["wot", "revocation", "create"] command.extend(subcommand) if file: command.extend([file]) -- GitLab