Small corrections 49/27349/1
authorTaseer Ahmed <taseer94@gmail.com>
Sun, 22 Jan 2017 07:28:40 +0000 (12:28 +0500)
committerTaseer Ahmed <taseer94@gmail.com>
Sun, 22 Jan 2017 07:39:01 +0000 (12:39 +0500)
JIRA: QTIP-188

Change-Id: I5820403527fe4df5e23472923e34660c72195d50
Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
qtip/cli/commands/cmd_metric.py
tests/unit/cli/test_metric.py

index 7f5c18d..d2fbd58 100644 (file)
@@ -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
index ed10689..239da96 100644 (file)
@@ -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