aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/cli
diff options
context:
space:
mode:
authorTaseer <taseer94@gmail.com>2017-06-29 05:24:25 +0500
committerTaseer <taseer94@gmail.com>2017-06-29 21:04:03 +0500
commit0a3a3045b97eee0583de82b532880b96807bd82a (patch)
treea1e910bed36d6cfd0cdec151beee5e5e57e7a126 /tests/unit/cli
parent76cb6b08ce04492bd02bec43487a82f99a0a2c5f (diff)
Integrate Report with CLI.
- Migrate fixtures to conftest to be used by multiple files Change-Id: I9a705b93189ac1f2e6fd2fc4e3f05aec7af379f1 Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
Diffstat (limited to 'tests/unit/cli')
-rw-r--r--tests/unit/cli/cmd_report_test.py34
1 files changed, 6 insertions, 28 deletions
diff --git a/tests/unit/cli/cmd_report_test.py b/tests/unit/cli/cmd_report_test.py
index 064ed8fd..e4e68fe0 100644
--- a/tests/unit/cli/cmd_report_test.py
+++ b/tests/unit/cli/cmd_report_test.py
@@ -7,35 +7,13 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import pytest
-from os import path
-from click.testing import CliRunner
-from qtip.cli.entry import cli
+from qtip.cli.commands import cmd_report as report
-@pytest.fixture(scope="module")
-def runner():
- return CliRunner()
+def test_dhrystone(aggregated_report):
+ """Test report"""
-
-@pytest.fixture(scope="module")
-def result_path():
- result = path.join(path.dirname(__file__), path.pardir, path.pardir,
- 'data/reporter')
- return result
-
-
-@pytest.mark.parametrize(['report_name'], [
- ('dhrystone',),
- ('whetstone',),
- ('dpi',),
- ('ramspeed',),
- ('ssl',)
-])
-def test_dhrystone(report_name, runner, result_path):
- """Test dhrystone report"""
-
- result = runner.invoke(cli, ['report', 'show', report_name, '-p', result_path])
- for line in str(result).split('\n'):
- assert len(line) <= 80
+ result = report.display_report(aggregated_report, 'ssl', 'compute')
+ assert result['ss'] == 1.0
+ assert result['desc'] == 'cryptography and SSL/TLS performance'