Skip to content

Commit

Permalink
Minor formatting fixues in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Wahlman <dev@wahlman.me>
  • Loading branch information
wahl-sec committed Aug 26, 2024
1 parent 27d4470 commit 71ef5d3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/test_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,18 @@ def test_knows_value(self, value: str) -> None:
@patch('cyclonedx.model.ThisTool._version', 'TESTING')
def test_cases_render_valid(self, of: OutputFormat, sv: SchemaVersion, *_: Any, **__: Any) -> None:
if OutputFormat.XML is of:
schema_cases = set(dp_cases_from_xml_schema(SCHEMA_XML[sv], _DP_ComponentIdentityEvidenceField.XML_SCHEMA_XPATH))
schema_cases = set(dp_cases_from_xml_schema(
SCHEMA_XML[sv], _DP_ComponentIdentityEvidenceField.XML_SCHEMA_XPATH))
elif OutputFormat.JSON is of:
schema_cases = set(dp_cases_from_json_schema(SCHEMA_JSON[sv], _DP_ComponentIdentityEvidenceField.JSON_SCHEMA_POINTER))
schema_cases = set(dp_cases_from_json_schema(
SCHEMA_JSON[sv], _DP_ComponentIdentityEvidenceField.JSON_SCHEMA_POINTER))
else:
raise ValueError(f'unexpected of: {of!r}')

bom = _make_bom(components=[
Component(bom_ref='dummy', name='dummy', evidence=ComponentEvidence(
copyright=[
Copyright(text="Dummy")
Copyright(text='Dummy')
],
identity=[
ComponentIdentityEvidence(
Expand All @@ -430,11 +432,11 @@ def test_cases_render_raises_on_unsupported(self, of: OutputFormat, sv: SchemaVe
# componentIdentityEvidence type was not added until 1.5
if sv.value < (1, 5):
return True

bom = _make_bom(components=[
Component(bom_ref='dummy', name='dummy', evidence=ComponentEvidence(
copyright=[
Copyright(text="Dummy")
Copyright(text='Dummy')
],
identity=[
ComponentIdentityEvidence(
Expand Down

0 comments on commit 71ef5d3

Please sign in to comment.