Skip to content

Commit

Permalink
Updating and improving tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Caroline Russell <[email protected]>
  • Loading branch information
cerrussell committed Oct 7, 2024
1 parent a1f09e7 commit 15faf37
Show file tree
Hide file tree
Showing 6 changed files with 218 additions and 218 deletions.
1 change: 1 addition & 0 deletions test/csaf_3.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions test/csaf_4.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions test/test_bom_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,10 @@ def results():
def test_bom_diff(results, options_1):
result, j1, j2 = compare_dicts(options_1)
_, result_summary = perform_bom_diff(j1, j2)
assert unpack_misc_data(result_summary, j1.options) == results["result_4"]

x = unpack_misc_data(result_summary, j1.options)
assert len(x.get("diff_summary", {}).get(j1.filename, {}).get("components", {}).get("frameworks", [])) == 13
assert len(x.get("diff_summary", {}).get(j2.filename, {}).get("components", {}).get("frameworks", [])) == 1
assert len(x.get("common_summary", {}).get("components", {}).get("frameworks", [])) == 5

def test_bom_diff_component_options(results, bom_dicts_1, bom_dicts_2, bom_dicts_3, bom_dicts_4, bom_dicts_5, bom_dicts_6, bom_dicts_7, bom_dicts_8):
# test --allow-new-data for components
Expand Down
Loading

0 comments on commit 15faf37

Please sign in to comment.