summaryrefslogtreecommitdiffstats
path: root/tests/unit/cli/test_options.py
diff options
context:
space:
mode:
authorzhihui wu <wu.zhihui1@zte.com.cn>2017-01-09 02:22:21 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-09 02:22:21 +0000
commit8e1acb5d6bcc8c96f452d269f269a417af85d8af (patch)
tree48f8ab5913be17029066764a654ec8f2ff310650 /tests/unit/cli/test_options.py
parentcca988890e67c0a87becd925b9baff11d416c6a5 (diff)
parentb1f9a775036c3bb2823ebe881540c480ec05355e (diff)
Merge "Rework Cli."
Diffstat (limited to 'tests/unit/cli/test_options.py')
-rw-r--r--tests/unit/cli/test_options.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/unit/cli/test_options.py b/tests/unit/cli/test_options.py
new file mode 100644
index 00000000..5129b5cc
--- /dev/null
+++ b/tests/unit/cli/test_options.py
@@ -0,0 +1,32 @@
+###############################################################
+# 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
+
+
+class TestClass(object):
+
+ @pytest.fixture()
+ def runner(self):
+ return CliRunner()
+
+ def test_verbose(self, runner):
+ result = runner.invoke(cli, ['-v'])
+ assert result.output == ''
+
+ def test_version(self, runner):
+ result = runner.invoke(cli, ['--version'])
+ assert '' in result.output
+
+ def test_debug(self, runner):
+ result = runner.invoke(cli, ['-d'])
+ assert '' in result.output