Skip to content

Commit db6443f

Browse files
committed
tests: simplify tests for crypto_refs
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent beb35f5 commit db6443f

15 files changed

+7
-374
lines changed

tests/_data/models.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ def get_crypto_properties_protocol() -> CryptoProperties:
239239
]
240240
)
241241
],
242+
crypto_refs=[BomRef('for-test-2'), BomRef('for-test-1')],
242243
),
243244
oid='an-oid-here'
244245
)
@@ -708,33 +709,6 @@ def get_bom_for_issue_328_components() -> Bom:
708709
return bom
709710

710711

711-
def get_bom_for_issue_692_components() -> Bom:
712-
"""regression test for issue #692
713-
see https://github.com/CycloneDX/cyclonedx-python-lib/issues/692
714-
"""
715-
bom = _make_bom()
716-
717-
comp_root = Component(type=ComponentType.APPLICATION,
718-
name='my application', version='1', bom_ref='my-project')
719-
comp_test = Component(
720-
name='comp_test',
721-
type=ComponentType.APPLICATION,
722-
bom_ref='crypto/protocol/test',
723-
crypto_properties=CryptoProperties(
724-
asset_type=CryptoAssetType.PROTOCOL,
725-
protocol_properties=ProtocolProperties(
726-
type=ProtocolPropertiesType.TLS,
727-
version='1.2',
728-
crypto_refs=[BomRef(value='for-test')]
729-
),
730-
oid='1.3.18.0.2.32.104',
731-
))
732-
bom.metadata.component = comp_root
733-
bom.register_dependency(comp_root, [comp_test])
734-
bom.components = [comp_test]
735-
return bom
736-
737-
738712
def get_component_setuptools_complete(include_pedigree: bool = True) -> Component:
739713
component = get_component_setuptools_simple(bom_ref='my-specific-bom-ref-for-dings')
740714
component.supplier = get_org_entity_1()
@@ -1476,5 +1450,4 @@ def get_bom_with_definitions_and_detailed_standards() -> Bom:
14761450
get_bom_with_lifecycles,
14771451
get_bom_with_definitions_standards,
14781452
get_bom_with_definitions_and_detailed_standards,
1479-
get_bom_for_issue_692_components,
14801453
}

tests/_data/snapshots/get_bom_for_issue_692_components-1.0.xml.bin

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.1.xml.bin

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.2.json.bin

Lines changed: 0 additions & 35 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.2.xml.bin

Lines changed: 0 additions & 22 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.3.json.bin

Lines changed: 0 additions & 35 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.3.xml.bin

Lines changed: 0 additions & 22 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.4.json.bin

Lines changed: 0 additions & 34 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.4.xml.bin

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.5.json.bin

Lines changed: 0 additions & 44 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.5.xml.bin

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/_data/snapshots/get_bom_for_issue_692_components-1.6.json.bin

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)