summaryrefslogtreecommitdiffstats
path: root/tests/unit/cli
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/cli')
-rw-r--r--tests/unit/cli/cmd_metric_test.py10
-rw-r--r--tests/unit/cli/cmd_plan_test.py10
-rw-r--r--tests/unit/cli/cmd_qpi_test.py10
3 files changed, 27 insertions, 3 deletions
diff --git a/tests/unit/cli/cmd_metric_test.py b/tests/unit/cli/cmd_metric_test.py
index 239da96e..30f3448a 100644
--- a/tests/unit/cli/cmd_metric_test.py
+++ b/tests/unit/cli/cmd_metric_test.py
@@ -13,7 +13,7 @@ from click.testing import CliRunner
from qtip.cli.entry import cli
-@pytest.fixture()
+@pytest.fixture(scope="module")
def runner():
return CliRunner()
@@ -29,3 +29,11 @@ def test_run(runner):
result = runner.invoke(cli, ['metric', 'run'])
assert 'Missing argument "name".' in result.output
+
+
+def test_show(runner):
+ result = runner.invoke(cli, ['metric', 'show', 'fake-metric'])
+ assert result.output == ''
+
+ result = runner.invoke(cli, ['metric', 'show'])
+ assert 'Missing argument "name".' in result.output
diff --git a/tests/unit/cli/cmd_plan_test.py b/tests/unit/cli/cmd_plan_test.py
index 3ce3766e..1708c340 100644
--- a/tests/unit/cli/cmd_plan_test.py
+++ b/tests/unit/cli/cmd_plan_test.py
@@ -13,7 +13,7 @@ from click.testing import CliRunner
from qtip.cli.entry import cli
-@pytest.fixture()
+@pytest.fixture(scope="module")
def runner():
return CliRunner()
@@ -29,3 +29,11 @@ def test_run(runner):
result = runner.invoke(cli, ['plan', 'run'])
assert 'Missing argument "name".' in result.output
+
+
+def test_show(runner):
+ result = runner.invoke(cli, ['plan', 'show', 'fake-plan'])
+ assert result.output == ''
+
+ result = runner.invoke(cli, ['plan', 'show'])
+ assert 'Missing argument "name".' in result.output
diff --git a/tests/unit/cli/cmd_qpi_test.py b/tests/unit/cli/cmd_qpi_test.py
index 992c85d7..485d5462 100644
--- a/tests/unit/cli/cmd_qpi_test.py
+++ b/tests/unit/cli/cmd_qpi_test.py
@@ -13,7 +13,7 @@ from click.testing import CliRunner
from qtip.cli.entry import cli
-@pytest.fixture()
+@pytest.fixture(scope="module")
def runner():
return CliRunner()
@@ -29,3 +29,11 @@ def test_run(runner):
result = runner.invoke(cli, ['qpi', 'run'])
assert 'Missing argument "name".' in result.output
+
+
+def test_show(runner):
+ result = runner.invoke(cli, ['qpi', 'show', 'fake-qpi'])
+ assert result.output == ''
+
+ result = runner.invoke(cli, ['qpi', 'show'])
+ assert 'Missing argument "name".' in result.output