diff --git a/silkaj/wot/revocation.py b/silkaj/wot/revocation.py index b157c89e8b46792aad8ad177731d1636a934973e..64770f29f1c135949e38c5970ce31fcc9c54eb26 100644 --- a/silkaj/wot/revocation.py +++ b/silkaj/wot/revocation.py @@ -106,16 +106,8 @@ existing identity.\nOptionnaly takes the document filename.", @click.pass_context def verify(ctx: click.Context, file: Path) -> None: rev_doc = verify_document(file) - - if ctx.obj["DRY_RUN"]: - click.echo(rev_doc.signed_raw()) - return - idty_table = idty_tools.display_identity(rev_doc.identity) click.echo(idty_table.draw()) - if ctx.obj["DISPLAY_DOCUMENT"]: - click.echo(rev_doc.signed_raw()) - click.echo("Revocation document is valid.") diff --git a/tests/unit/wot/test_revocation.py b/tests/unit/wot/test_revocation.py index e7e4d46cb0fdfe9cd1d74b6d8134bf0148cb06dd..166b1b83ebcee6953eb624c922357a9c43fbe138 100644 --- a/tests/unit/wot/test_revocation.py +++ b/tests/unit/wot/test_revocation.py @@ -143,10 +143,6 @@ def patched_send_bma_revoke_error(wot_useless, rev_doc_useless): @pytest.mark.parametrize( ("subcommand", "expected_warn"), [ - ( - "verify", - False, - ), ( "publish", True, @@ -265,11 +261,9 @@ def test_revocation_cli_create(file, user_input, expected, monkeypatch): # test cli verify @pytest.mark.parametrize( - ("display", "dry_run", "doc", "lookup", "file", "expected", "not_expected"), + ("doc", "lookup", "file", "expected", "not_expected"), [ ( - False, - False, REV_DOC, lookup_one, "", @@ -277,11 +271,9 @@ def test_revocation_cli_create(file, user_input, expected, monkeypatch): "| Public key |", "Revocation document is valid.\n", ], - ["Version: 10"], + [], ), ( - False, - False, REV_DOC, lookup_two, "", @@ -291,50 +283,19 @@ def test_revocation_cli_create(file, user_input, expected, monkeypatch): "| Public key |", "Revocation document is valid.\n", ], - ["Version: 10"], - ), - ( - True, - False, - REV_DOC, - lookup_one, - "", - [ - "Version: 10", - "| Public key |", - "Revocation document is valid.\n", - ], [], ), ( - False, - True, - REV_DOC, - lookup_one, - "", - [ - "Version: 10", - ], - [ - "Revocation document is valid.\n", - ], - ), - ( - False, - False, REV_DOC_FALSE, lookup_one, "", ["Error: the signature of the revocation document is invalid."], [ - "Version: 10", "| Public key |", "Revocation document is valid.\n", ], ), ( - False, - False, REV_2, lookup_two, "test_doc", @@ -347,14 +308,11 @@ def test_revocation_cli_create(file, user_input, expected, monkeypatch): [ "Revocation document is valid.\n", "| Public key |", - "Version: 10", ], ), ], ) def test_revocation_cli_verify( - display, - dry_run, doc, lookup, file, @@ -370,8 +328,7 @@ def test_revocation_cli_verify( monkeypatch.setattr(bc_tools, "get_head_block", patched_get_head_block_gtest) # prepare command - command = display_dry_options(display, dry_run) - command.extend(["wot", "revocation", "verify"]) + command = ["wot", "revocation", "verify"] if file: command.extend([file]) else: