Skip to content
This repository was archived by the owner on Aug 8, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyethapp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def list_accounts(ctx):
id='Id (if any)',
locked='Locked'))
for i, account in enumerate(accounts):
click.echo(fmt.format(i='#' + to_string(i + 1),
click.echo(fmt.format(i='#' + str(i + 1),
address=encode_hex(account.address or ''),
id=account.uuid or '',
locked='yes' if account.locked else 'no'))
Expand Down
8 changes: 8 additions & 0 deletions pyethapp/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ def test_no_such_command():
result = runner.invoke(app.app, ['eat'])
assert 'Error: No such command "eat"' in result.output, result.output

def test_account_list():
runner = CliRunner()
result = runner.invoke(app.app, ['account', 'list'])
assert '#1' in result.output, result.output
assert 'Locked' in result.output, result.output

print(result.output)

@pytest.mark.parametrize('content', ['', '<html/>', 'print "hello world"'])
def test_non_dict_yaml_as_config_file(content):
Expand Down Expand Up @@ -117,3 +124,4 @@ def test_config_from_datadir(tmpdir):
test_custom_config_file(('-C', 'myconfig.yaml'))
test_custom_config_file(('-c', 'mygenesis.json'))
test_custom_config_file(('-c', 'dict'))
test_account_list()