From 6463b6635a8094a0ddcf83605cd231ba46104f72 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Tue, 25 Apr 2017 13:49:21 +0800 Subject: Add ssl aes metrics in qpi calculation Change-Id: Id568aa3942849e105ca24892babff2acaec21121 Signed-off-by: Yujun Zhang --- tests/unit/ansible_library/plugins/action/calculate_test.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/unit/ansible_library') diff --git a/tests/unit/ansible_library/plugins/action/calculate_test.py b/tests/unit/ansible_library/plugins/action/calculate_test.py index 3b34d9f5..68a03e2a 100644 --- a/tests/unit/ansible_library/plugins/action/calculate_test.py +++ b/tests/unit/ansible_library/plugins/action/calculate_test.py @@ -83,3 +83,10 @@ def test_calc_section(section_spec, metrics, section_result): def test_calc_qpi(qpi_spec, metrics, qpi_result): assert calculate.calc_qpi(qpi_spec, metrics) == qpi_result + + +@pytest.mark.parametrize('metrics, baseline, expected', [ + (['612376.96k'], '612376.96k', 1) +]) +def test_calc_score(metrics, baseline, expected): + assert calculate.calc_score(metrics, baseline) == expected -- cgit 1.2.3-korg