From b694a4a2d4719169ccc7fb3696367bca7118b513 Mon Sep 17 00:00:00 2001 From: Taseer Date: Tue, 11 Apr 2017 21:39:18 +0500 Subject: User friendly messages for exceptions - Use colorama for color - Implement verbosity option in separate patch Change-Id: Ib2491d867e9bbf59cb00874d99a11f86ad7eea1b Signed-off-by: Taseer Ahmed --- tests/unit/cli/cmd_metric_test.py | 3 +++ tests/unit/cli/cmd_plan_test.py | 3 +++ tests/unit/cli/cmd_qpi_test.py | 3 +++ 3 files changed, 9 insertions(+) (limited to 'tests/unit') 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 -- cgit 1.2.3-korg