summaryrefslogtreecommitdiffstats
path: root/tests/unit/cli/cmd_qpi_test.py
diff options
context:
space:
mode:
authorTaseer Ahmed <taseer94@gmail.com>2017-08-07 23:42:37 +0500
committerTaseer Ahmed <taseer94@gmail.com>2017-08-09 16:06:34 +0500
commit2501453ab6facb74b1a4ded824c8ccb17fac8d66 (patch)
tree977bee430a2c04a277eca34dda7d430f91cf4bb6 /tests/unit/cli/cmd_qpi_test.py
parentf708300052c2315994ba16793972ce0dfbfa237e (diff)
Refactor QPI module
- Delete outdated code Change-Id: I0505d3ccc1ea76078f4d307f7d5ef66777ff6eb7 Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
Diffstat (limited to 'tests/unit/cli/cmd_qpi_test.py')
-rw-r--r--tests/unit/cli/cmd_qpi_test.py24
1 files changed, 7 insertions, 17 deletions
diff --git a/tests/unit/cli/cmd_qpi_test.py b/tests/unit/cli/cmd_qpi_test.py
index e7823c9b..ba5f814e 100644
--- a/tests/unit/cli/cmd_qpi_test.py
+++ b/tests/unit/cli/cmd_qpi_test.py
@@ -20,24 +20,14 @@ def runner():
def test_list(runner):
result = runner.invoke(cli, ['qpi', 'list'])
- assert 'QPIs' and 'compute' in result.output
-
-
-def test_run(runner):
- result = runner.invoke(cli, ['qpi', 'run', 'fake-qpi'])
- assert result.output == ''
-
- result = runner.invoke(cli, ['qpi', 'run'])
- assert 'Missing argument "name".' in result.output
+ assert 'QPI' in result.output
+ assert 'compute' in result.output
+ assert 'Description' in result.output
+ assert 'QTIP Performance Index of compute' in result.output
def test_show(runner):
result = runner.invoke(cli, ['qpi', 'show', 'compute'])
- assert 'Name: compute' in result.output
- assert 'Description: sample performance index of computing' in result.output
-
- 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
+ assert 'QPI' in result.output
+ assert 'Description' in result.output
+ assert 'Formula' in result.output