mirror of https://github.com/nucypher/nucypher.git
Stub CLI tests: One test module per command.
parent
dfebbe55ff
commit
1288fc19f9
|
@ -0,0 +1,23 @@
|
|||
from click.testing import CliRunner
|
||||
|
||||
from nucypher_cli.main import cli
|
||||
|
||||
|
||||
def test_list():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['accounts', 'list'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_lock():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['accounts', 'lock'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_unlock():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['accounts', 'unlock'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_balance():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['accounts', 'balance'], catch_exceptions=False)
|
|
@ -0,0 +1,15 @@
|
|||
from click.testing import CliRunner
|
||||
|
||||
from nucypher_cli.main import cli
|
||||
|
||||
|
||||
def test_init():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['config', 'init'], catch_exceptions=False)
|
||||
assert result.exit_code == 0
|
||||
|
||||
|
||||
def test_validate():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['config', 'validate'], catch_exceptions=False)
|
||||
assert result.exit_code == 0
|
|
@ -17,3 +17,17 @@ def test_deploy():
|
|||
|
||||
assert result.exit_code == 0
|
||||
|
||||
|
||||
def test_swarm():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['simulate', 'swarm'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_status():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['simulate', 'status'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_stop():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['simulate', 'deploy'], catch_exceptions=False)
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
from click.testing import CliRunner
|
||||
|
||||
from nucypher_cli.main import cli
|
||||
|
||||
|
||||
def test_stake_init():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['stake', 'init'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_stake_resume():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['stake', 'resume'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_stake_info():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['stake', 'info'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_stake_list():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['stake', 'list'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_stake_confirm():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['stake', 'confirm-activity'], catch_exceptions=False)
|
||||
|
||||
|
||||
def test_stake_divide():
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(cli, ['stake', 'divide-stake'], catch_exceptions=False)
|
Loading…
Reference in New Issue