From 4f0e1d205abe43933bb17ee4f04047da88086c8a Mon Sep 17 00:00:00 2001 From: Rich Piazza Date: Sat, 16 Mar 2024 13:53:34 -0400 Subject: [PATCH] fiux test-environments - weights changed --- stix2/test/v20/test_environment.py | 12 ++++++------ stix2/test/v21/test_environment.py | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/stix2/test/v20/test_environment.py b/stix2/test/v20/test_environment.py index c8867b0..b6f3a0b 100644 --- a/stix2/test/v20/test_environment.py +++ b/stix2/test/v20/test_environment.py @@ -515,12 +515,12 @@ def test_graph_similarity_with_filesystem_source(ds, fs): prop_scores2 = {} env2 = stix2.Environment().graph_similarity(ds, fs, prop_scores2, ignore_spec_version=True) - assert round(env1) == 25 - assert round(prop_scores1["matching_score"]) == 451 + assert round(env1) == 19 + assert round(prop_scores1["matching_score"]) == 334 assert round(prop_scores1["len_pairs"]) == 18 - assert round(env2) == 25 - assert round(prop_scores2["matching_score"]) == 451 + assert round(env2) == 19 + assert round(prop_scores2["matching_score"]) == 334 assert round(prop_scores2["len_pairs"]) == 18 prop_scores1["matching_score"] = round(prop_scores1["matching_score"], 3) @@ -587,11 +587,11 @@ def test_graph_equivalence_with_filesystem_source(ds, fs): env2 = stix2.Environment().graph_equivalence(ds, fs, prop_scores2, ignore_spec_version=True) assert env1 is False - assert round(prop_scores1["matching_score"]) == 451 + assert round(prop_scores1["matching_score"]) == 334 assert round(prop_scores1["len_pairs"]) == 18 assert env2 is False - assert round(prop_scores2["matching_score"]) == 451 + assert round(prop_scores2["matching_score"]) == 334 assert round(prop_scores2["len_pairs"]) == 18 prop_scores1["matching_score"] = round(prop_scores1["matching_score"], 3) diff --git a/stix2/test/v21/test_environment.py b/stix2/test/v21/test_environment.py index 883ff01..51ca15a 100644 --- a/stix2/test/v21/test_environment.py +++ b/stix2/test/v21/test_environment.py @@ -900,7 +900,7 @@ def test_object_similarity_prop_scores(): tool2 = stix2.v21.Tool(id=TOOL_ID, **TOOL2_KWARGS) stix2.Environment().object_similarity(tool1, tool2, prop_scores) assert len(prop_scores) == 4 - assert round(prop_scores["matching_score"], 1) == 8.9 + assert round(prop_scores["matching_score"], 1) == 0.0 assert round(prop_scores["sum_weights"], 1) == 100.0 @@ -1050,12 +1050,12 @@ def test_graph_similarity_with_filesystem_source(ds, fs): max_depth=1, ) - assert round(env1) == 23 - assert round(prop_scores1["matching_score"]) == 411 + assert round(env1) == 17 + assert round(prop_scores1["matching_score"]) == 308 assert round(prop_scores1["len_pairs"]) == 18 - assert round(env2) == 23 - assert round(prop_scores2["matching_score"]) == 411 + assert round(env2) == 17 + assert round(prop_scores2["matching_score"]) == 308 assert round(prop_scores2["len_pairs"]) == 18 prop_scores1["matching_score"] = round(prop_scores1["matching_score"], 3) @@ -1225,11 +1225,11 @@ def test_graph_equivalence_with_filesystem_source(ds, fs): env2 = stix2.Environment().graph_equivalence(ds, fs, prop_scores2, ignore_spec_version=True) assert env1 is False - assert round(prop_scores1["matching_score"]) == 411 + assert round(prop_scores1["matching_score"]) == 308 assert round(prop_scores1["len_pairs"]) == 18 assert env2 is False - assert round(prop_scores2["matching_score"]) == 411 + assert round(prop_scores2["matching_score"]) == 308 assert round(prop_scores2["len_pairs"]) == 18 prop_scores1["matching_score"] = round(prop_scores1["matching_score"], 3)