Skip to content

Commit

Permalink
chore: Making SPDXRelation in tests explicit
Browse files Browse the repository at this point in the history
This prevents pydantic from complaining about potentially
unserializable object.

Signed-off-by: Alexey Ovchinnikov <[email protected]>
  • Loading branch information
a-ovchinnikov committed Jan 29, 2025
1 parent d581727 commit 919ebca
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/unit/models/test_sbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,12 +559,14 @@ def test_cyclonedx_sbom_can_be_converted_to_spdx_and_back_without_loosing_any_da
}
)

DEFAULT_ROOT_RELATION = {
"spdxElementId": "SPDXRef-DOCUMENT",
"comment": "",
"relatedSpdxElement": "SPDXRef-DocumentRoot-File-",
"relationshipType": "DESCRIBES",
}
DEFAULT_ROOT_RELATION = SPDXRelation(
**{
"spdxElementId": "SPDXRef-DOCUMENT",
"comment": "",
"relatedSpdxElement": "SPDXRef-DocumentRoot-File-",
"relationshipType": "DESCRIBES",
}
)


def _gen_ref(locator: str) -> dict:
Expand Down

0 comments on commit 919ebca

Please sign in to comment.