diff --git a/src/test/unit/web_interface/test_filter.py b/src/test/unit/web_interface/test_filter.py index 8f29b859b..e1e7cca4f 100644 --- a/src/test/unit/web_interface/test_filter.py +++ b/src/test/unit/web_interface/test_filter.py @@ -394,40 +394,33 @@ def test_replace_cwe_with_link(input_string, expected_result): ({}, []), ( # primary key max(v2, v3) sorting { - 'cve_id1': {'score2': '6.0', 'score3': '2.0'}, - 'cve_id2': {'score2': '4.0', 'score3': '3.0'}, - 'cve_id3': {'score2': '1.0', 'score3': '5.0'}, + 'cve_id1': {'scores': {'V2': '6.0', 'V3.0': '2.0'}}, + 'cve_id2': {'scores': {'V2': '4.0', 'V3.0': '3.0'}}, + 'cve_id3': {'scores': {'V2': '1.0', 'V3.0': '5.0'}}, }, ['cve_id1', 'cve_id3', 'cve_id2'], ), ( # numerical sorting { - 'cve_id1': {'score2': '1.3', 'score3': '0.0'}, - 'cve_id2': {'score2': '10.0', 'score3': '0.0'}, - 'cve_id3': {'score2': '2.6', 'score3': '0.0'}, + 'cve_id1': {'scores': {'V2': '1.3', 'V3.0': '0.0'}}, + 'cve_id2': {'scores': {'V2': '10.0', 'V3.0': '0.0'}}, + 'cve_id3': {'scores': {'V2': '2.6', 'V3.0': '0.0'}}, }, ['cve_id2', 'cve_id3', 'cve_id1'], ), ( # secondary key sorting { - 'cve_id1': {'score2': '5.0', 'score3': '2.0'}, - 'cve_id2': {'score2': '5.0', 'score3': '3.0'}, - 'cve_id3': {'score2': '5.0', 'score3': '4.0'}, + 'cve_id1': {'scores': {'V2': '5.0', 'V3.0': '2.0'}}, + 'cve_id2': {'scores': {'V2': '5.0', 'V3.0': '3.0'}}, + 'cve_id3': {'scores': {'V2': '5.0', 'V3.0': '4.0'}}, }, ['cve_id3', 'cve_id2', 'cve_id1'], ), - ( # N/A entries - { - 'cve_id1': {'score2': 'N/A', 'score3': '4.0'}, - 'cve_id2': {'score2': '3.0', 'score3': 'N/A'}, - }, - ['cve_id1', 'cve_id2'], - ), ( # missing entries { - 'cve_id1': {'score3': '1.0'}, - 'cve_id2': {'score2': '2.0'}, - 'cve_id3': {}, + 'cve_id1': {'scores': {'V3.0': '1.0'}}, + 'cve_id2': {'scores': {'V2': '2.0'}}, + 'cve_id3': {'scores': {}}, }, ['cve_id2', 'cve_id1', 'cve_id3'], ),