diff --git a/silkaj/cli.py b/silkaj/cli.py index e5dbd10c0074831fd0a8c87685a72abd72729186..7663c1baab4fa291d6e4e6109120f0abe8648f57 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 f09110bc2a9e3a5178948352945c22f063186d00..4bbb0bce7924930a03c0fefdd109470040d2dee7 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 190978073abca0672a9f6d20f7155a2854df8405..eeeb7df7ac3eda5b317b9d1f01915d557a4d951f 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])