Skip to content

Commit 7b64985

Browse files
committed
chore(test): add test get_bom_with_provides
Signed-off-by: Uzair Chhapra <[email protected]>
1 parent 5bdc59d commit 7b64985

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/_data/models.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,28 @@ def get_bom_with_definitions_and_detailed_standards() -> Bom:
14061406
]))
14071407

14081408

1409+
def get_bom_with_provides() -> Bom:
1410+
c1 = get_component_toml_with_hashes_with_references('crypto-library')
1411+
c2 = get_component_setuptools_simple('some-library')
1412+
c3 = get_component_crypto_asset_algorithm('crypto-algorithm')
1413+
return _make_bom(
1414+
components=[c1, c2, c3],
1415+
dependencies=[
1416+
Dependency(
1417+
ref=c1.bom_ref,
1418+
dependencies=[Dependency(ref=c2.bom_ref)],
1419+
provides=[Dependency(ref=c3.bom_ref)]
1420+
),
1421+
Dependency(
1422+
ref=c2.bom_ref
1423+
),
1424+
Dependency(
1425+
ref=c3.bom_ref
1426+
),
1427+
],
1428+
)
1429+
1430+
14091431
def get_bom_for_issue540_duplicate_components() -> Bom:
14101432
# tests https://github.com/CycloneDX/cyclonedx-python-lib/issues/540
14111433
bom = _make_bom()

0 commit comments

Comments
 (0)