Skip to content

Commit

Permalink
test: renames
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Oct 2, 2023
1 parent 27b63ae commit 27b0a91
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/functional/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,20 @@ def get_expected_account_str(acct):
return f"__expected_output__: {acct.address}"


def test_get_user_selected_account_no_accounts_found(no_accounts):
def test_select_account_no_accounts_found(no_accounts):
with pytest.raises(AccountsError, match="No accounts found."):
assert not select_account()


def test_get_user_selected_account_one_account(runner, one_account):
def test_select_account_one_account(runner, one_account):
# No input needed when only one account
with runner.isolation():
account = select_account()

assert account == one_account


def test_get_user_selected_account_multiple_accounts_requires_input(
def test_select_account_multiple_accounts_requires_input(
runner, keyfile_account, second_keyfile_account
):
with runner.isolation(input="0\n"):
Expand All @@ -123,7 +123,7 @@ def test_get_user_selected_account_multiple_accounts_requires_input(
assert account == keyfile_account


def test_get_user_selected_account_custom_prompt(runner, keyfile_account, second_keyfile_account):
def test_select_account_custom_prompt(runner, keyfile_account, second_keyfile_account):
prompt = "THIS_IS_A_CUSTOM_PROMPT"
with runner.isolation(input="0\n") as out_streams:
select_account(prompt)
Expand All @@ -132,14 +132,14 @@ def test_get_user_selected_account_custom_prompt(runner, keyfile_account, second
assert prompt in output


def test_get_user_selected_account_specify_type(runner, one_keyfile_account):
def test_select_account_specify_type(runner, one_keyfile_account):
with runner.isolation():
account = select_account(account_type=type(one_keyfile_account))

assert account == one_keyfile_account


def test_get_user_selected_account_unknown_type(runner, keyfile_account):
def test_select_account_unknown_type(runner, keyfile_account):
with pytest.raises(AccountsError) as err:
select_account(account_type=str) # type: ignore

Expand Down

0 comments on commit 27b0a91

Please sign in to comment.