aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/cli/cmd_report_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/cli/cmd_report_test.py')
-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'