mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Separate test for empty args
This commit is contained in:
parent
b2ac60ba3e
commit
dea2df9db0
@ -64,14 +64,10 @@ def mock_bigchaindb_backup_config(monkeypatch):
|
||||
|
||||
def test_make_sure_we_dont_remove_any_command():
|
||||
# thanks to: http://stackoverflow.com/a/18161115/597097
|
||||
from bigchaindb.commands.bigchain import utils
|
||||
from bigchaindb.commands.bigchain import create_parser
|
||||
|
||||
parser = create_parser()
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
utils.start(parser, [], {})
|
||||
|
||||
assert parser.parse_args(['configure']).command
|
||||
assert parser.parse_args(['show-config']).command
|
||||
assert parser.parse_args(['export-my-pubkey']).command
|
||||
@ -95,6 +91,16 @@ def test_start_raises_if_command_not_implemented():
|
||||
utils.start(parser, ['configure'], {})
|
||||
|
||||
|
||||
def test_start_raises_if_no_arguments_given():
|
||||
from bigchaindb.commands.bigchain import utils
|
||||
from bigchaindb.commands.bigchain import create_parser
|
||||
|
||||
parser = create_parser()
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
utils.start(parser, [], {})
|
||||
|
||||
|
||||
@patch('multiprocessing.cpu_count', return_value=42)
|
||||
def test_start_sets_multiprocess_var_based_on_cli_args(mock_cpu_count):
|
||||
def run_load(args):
|
||||
|
Loading…
x
Reference in New Issue
Block a user