Skip to content

Commit a93d48c

Browse files
committed
further unit test fixes/alignments
Signed-off-by: Paul Horton <[email protected]>
1 parent c362254 commit a93d48c

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

cyclonedx/model/service.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
# Copyright (c) OWASP Foundation. All Rights Reserved.
1717

1818
from typing import Any, Iterable, Optional, Union
19+
from uuid import uuid4
1920

2021
import serializable
2122
from sortedcontainers import SortedSet
22-
from uuid import uuid4
2323

2424
from cyclonedx.serialization import BomRefHelper
2525

tests/test_model_component.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
Pedigree,
4545
)
4646
from cyclonedx.model.issue import IssueClassification, IssueType
47-
4847
from tests.data import (
48+
MOCK_UUID_7,
4949
get_component_setuptools_simple,
5050
get_component_setuptools_simple_no_version,
5151
get_component_toml_with_hashes_with_references,
@@ -54,7 +54,7 @@
5454
get_pedigree_1,
5555
get_swid_1,
5656
get_swid_2,
57-
reorder, MOCK_UUID_7,
57+
reorder,
5858
)
5959

6060

tests/test_model_service.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
from unittest.mock import Mock, patch
2222

2323
from cyclonedx.model.service import Service
24-
25-
from tests.data import reorder, MOCK_UUID_8, MOCK_UUID_9
24+
from tests.data import MOCK_UUID_8, MOCK_UUID_9, reorder
2625

2726

2827
class TestModelService(TestCase):

tests/test_model_vulnerability.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
VulnerabilitySeverity,
3737
VulnerabilitySource,
3838
)
39-
40-
from tests.data import reorder, MOCK_UUID_10
39+
from tests.data import MOCK_UUID_10, reorder
4140

4241

4342
class TestModelVulnerability(TestCase):

tests/test_output_json.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
MOCK_UUID_1,
3232
MOCK_UUID_2,
3333
MOCK_UUID_3,
34+
MOCK_UUID_4,
35+
MOCK_UUID_5,
3436
MOCK_UUID_6,
3537
TEST_UUIDS,
3638
get_bom_for_issue_275_components,
@@ -48,7 +50,7 @@
4850
get_bom_with_metadata_component_and_dependencies,
4951
get_bom_with_nested_services,
5052
get_bom_with_services_complex,
51-
get_bom_with_services_simple, MOCK_UUID_5, MOCK_UUID_4,
53+
get_bom_with_services_simple,
5254
)
5355

5456

@@ -374,14 +376,6 @@ def test_bom_v1_2_dependencies_for_bom_component(self) -> None:
374376
fixture='bom_dependencies_component.json'
375377
)
376378

377-
@unittest.skip
378-
def test_bom_v1_4_dependencies_invalid(self) -> None:
379-
with self.assertRaises(UnknownComponentDependencyException):
380-
self._validate_json_bom(
381-
bom=get_bom_with_dependencies_invalid(), schema_version=SchemaVersion.V1_4,
382-
fixture='bom_dependencies.json'
383-
)
384-
385379
@unittest.skip('See https://github.com/CycloneDX/specification/issues/146')
386380
def test_bom_v1_4_issue_275_components(self) -> None:
387381
self._validate_json_bom(

0 commit comments

Comments
 (0)