Skip to content
Snippets Groups Projects
Commit ce759a4e authored by Moul's avatar Moul
Browse files

[mod] test_membership_cmd: always success status code

parent a7460221
No related branches found
No related tags found
1 merge request!182#390, #396, #407: Drop async, send_doc(), Documents BBC
......@@ -38,7 +38,7 @@ from patched.wot import (
from silkaj import auth, membership, wot
from silkaj.blockchain_tools import BlockchainParams, HeadBlock
from silkaj.cli import cli
from silkaj.constants import DATE, FAILURE_EXIT_STATUS, SUCCESS_EXIT_STATUS
from silkaj.constants import DATE, SUCCESS_EXIT_STATUS
from silkaj.network_tools import ClientInstance
from silkaj.tui import display_pubkey_and_checksum
......@@ -65,15 +65,15 @@ def patched_choose_identity(pubkey):
@pytest.mark.parametrize(
"dry_run, display, confirmation, exit_code",
"dry_run, display, confirmation",
[
(True, False, False, SUCCESS_EXIT_STATUS),
(False, True, False, SUCCESS_EXIT_STATUS),
(False, True, True, FAILURE_EXIT_STATUS),
(False, False, True, FAILURE_EXIT_STATUS),
(True, False, False),
(False, True, False),
(False, True, True),
(False, False, True),
],
)
def test_membership_cmd(dry_run, display, confirmation, exit_code, monkeypatch):
def test_membership_cmd(dry_run, display, confirmation, monkeypatch):
# Monkeypatch and Mock
monkeypatch.setattr(auth, "auth_method", patched_auth_method)
monkeypatch.setattr(HeadBlock, "get_head", patched_head_block)
......@@ -125,7 +125,7 @@ def test_membership_cmd(dry_run, display, confirmation, exit_code, monkeypatch):
# signing_key,
# )
assert result.exit_code == exit_code
assert result.exit_code == SUCCESS_EXIT_STATUS
@pytest.mark.parametrize(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment