summaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorzhihui wu <wu.zhihui1@zte.com.cn>2017-04-14 03:32:36 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-14 03:32:36 +0000
commit12b200e2c566bb0e3696ecea0d5f4fae9c74ffec (patch)
tree3ef757b4fb781553db45c8b33f16a22b59e5cead /tests/unit
parentc70d80c0abbc50e2d12f4eb64ae16cddfcc6b6cd (diff)
parentb694a4a2d4719169ccc7fb3696367bca7118b513 (diff)
Merge "User friendly messages for exceptions"
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/cli/cmd_metric_test.py3
-rw-r--r--tests/unit/cli/cmd_plan_test.py3
-rw-r--r--tests/unit/cli/cmd_qpi_test.py3
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/cli/cmd_metric_test.py b/tests/unit/cli/cmd_metric_test.py
index cd496ad9..c92e944b 100644
--- a/tests/unit/cli/cmd_metric_test.py
+++ b/tests/unit/cli/cmd_metric_test.py
@@ -41,3 +41,6 @@ def test_show(runner):
result = runner.invoke(cli, ['metric', 'show'])
assert 'Missing argument "name".' in result.output
+
+ result = runner.invoke(cli, ['metric', 'show', 'xyz'])
+ assert "ERROR: metric spec: xyz not found" in result.output
diff --git a/tests/unit/cli/cmd_plan_test.py b/tests/unit/cli/cmd_plan_test.py
index 30025ae0..53a04800 100644
--- a/tests/unit/cli/cmd_plan_test.py
+++ b/tests/unit/cli/cmd_plan_test.py
@@ -38,3 +38,6 @@ def test_show(runner):
result = runner.invoke(cli, ['plan', 'show'])
assert 'Missing argument "name".' in result.output
+
+ result = runner.invoke(cli, ['plan', 'show', 'xyz'])
+ assert "ERROR: plan spec: xyz not found" in result.output
diff --git a/tests/unit/cli/cmd_qpi_test.py b/tests/unit/cli/cmd_qpi_test.py
index 3d2c2613..e7823c9b 100644
--- a/tests/unit/cli/cmd_qpi_test.py
+++ b/tests/unit/cli/cmd_qpi_test.py
@@ -38,3 +38,6 @@ def test_show(runner):
result = runner.invoke(cli, ['qpi', 'show'])
assert 'Missing argument "name".' in result.output
+
+ result = runner.invoke(cli, ['qpi', 'show', 'xyz'])
+ assert "ERROR: qpi spec: xyz not found" in result.output