diff options
author | Taseer Ahmed <taseer94@gmail.com> | 2017-01-22 12:28:40 +0500 |
---|---|---|
committer | Taseer Ahmed <taseer94@gmail.com> | 2017-01-22 12:39:01 +0500 |
commit | aa29aa91a860ab7659d9cf5afc47049520354ec7 (patch) | |
tree | 4b94c40efd9fe23cc470f641045d23fe4a7f832f | |
parent | e835a660789c2f152750308fa1eeb1b5e970a257 (diff) |
Small corrections
JIRA: QTIP-188
Change-Id: I5820403527fe4df5e23472923e34660c72195d50
Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
-rw-r--r-- | qtip/cli/commands/cmd_metric.py | 3 | ||||
-rw-r--r-- | tests/unit/cli/test_metric.py | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/qtip/cli/commands/cmd_metric.py b/qtip/cli/commands/cmd_metric.py index 7f5c18d3..d2fbd58f 100644 --- a/qtip/cli/commands/cmd_metric.py +++ b/qtip/cli/commands/cmd_metric.py @@ -28,6 +28,7 @@ def cmd_list(ctx): @cli.command('run', help='Run tests to collect Performance Metrics') +@click.argument('name') @pass_context -def cmd_run(ctx): +def cmd_run(ctx, name): pass diff --git a/tests/unit/cli/test_metric.py b/tests/unit/cli/test_metric.py index ed10689c..239da96e 100644 --- a/tests/unit/cli/test_metric.py +++ b/tests/unit/cli/test_metric.py @@ -10,7 +10,7 @@ import pytest from click.testing import CliRunner -from qtip.cli.commands.cmd_metric import cli +from qtip.cli.entry import cli @pytest.fixture() @@ -19,10 +19,13 @@ def runner(): def test_list(runner): - result = runner.invoke(cli, ['list']) + result = runner.invoke(cli, ['metric', 'list']) assert result.output == '' def test_run(runner): - result = runner.invoke(cli, ['run']) + result = runner.invoke(cli, ['metric', 'run', 'fake-metric']) assert result.output == '' + + result = runner.invoke(cli, ['metric', 'run']) + assert 'Missing argument "name".' in result.output |