summaryrefslogtreecommitdiffstats
path: root/tests/unit/cli
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/cli')
-rw-r--r--tests/unit/cli/cmd_report.py23
-rw-r--r--tests/unit/cli/options_test.py9
2 files changed, 28 insertions, 4 deletions
diff --git a/tests/unit/cli/cmd_report.py b/tests/unit/cli/cmd_report.py
new file mode 100644
index 00000000..e010b960
--- /dev/null
+++ b/tests/unit/cli/cmd_report.py
@@ -0,0 +1,23 @@
+###############################################################
+# Copyright (c) 2016 ZTE Corp and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+import pytest
+from click.testing import CliRunner
+
+from qtip.cli.entry import cli
+
+
+@pytest.fixture(scope="module")
+def runner():
+ return CliRunner()
+
+
+def test_show(runner):
+ result = runner.invoke(cli, ['report', 'show'])
+ assert result.output == ''
diff --git a/tests/unit/cli/options_test.py b/tests/unit/cli/options_test.py
index f9472814..9dbbe6f3 100644
--- a/tests/unit/cli/options_test.py
+++ b/tests/unit/cli/options_test.py
@@ -1,5 +1,5 @@
###############################################################
-# Copyright (c) 2016 ZTE Corp and others.
+# Copyright (c) 2017 taseer94@gmail.com and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -8,8 +8,9 @@
##############################################################################
import pytest
-from click.testing import CliRunner
+import sys
+from click.testing import CliRunner
from qtip.cli.entry import cli
@@ -28,5 +29,5 @@ class TestClass(object):
assert 'dev' in result.output
def test_debug(self, runner):
- result = runner.invoke(cli, ['-d'])
- assert '' in result.output
+ runner.invoke(cli, ['-d'])
+ assert sys.tracebacklimit == 8