File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change 3737from sortedcontainers import SortedSet
3838
3939from .._internal .compare import ComparableTuple as _ComparableTuple
40- from ..exception .model import (
41- InvalidLocaleTypeException ,
42- InvalidUriException ,
43- NoPropertiesProvidedException ,
44- UnknownHashTypeException ,
45- )
40+ from ..exception .model import InvalidLocaleTypeException , InvalidUriException , UnknownHashTypeException
4641from ..exception .serialization import CycloneDxDeserializationException , SerializationOfUnexpectedValueException
4742from ..schema .schema import (
4843 SchemaVersion1Dot0 ,
@@ -1180,11 +1175,6 @@ def __init__(
11801175 name : Optional [str ] = None ,
11811176 email : Optional [str ] = None ,
11821177 ) -> None :
1183- if not timestamp and not name and not email :
1184- raise NoPropertiesProvidedException (
1185- 'At least one of `timestamp`, `name` or `email` must be provided for an `IdentifiableAction`.'
1186- )
1187-
11881178 self .timestamp = timestamp
11891179 self .name = name
11901180 self .email = email
Original file line number Diff line number Diff line change 2424from ddt import ddt , named_data
2525
2626from cyclonedx ._internal .compare import ComparableTuple
27- from cyclonedx .exception .model import (
28- InvalidLocaleTypeException ,
29- InvalidUriException ,
30- NoPropertiesProvidedException ,
31- UnknownHashTypeException ,
32- )
27+ from cyclonedx .exception .model import InvalidLocaleTypeException , InvalidUriException , UnknownHashTypeException
3328from cyclonedx .model import (
3429 Copyright ,
3530 Encoding ,
@@ -308,10 +303,6 @@ def test_sort(self) -> None:
308303
309304class TestModelIdentifiableAction (TestCase ):
310305
311- def test_no_params (self ) -> None :
312- with self .assertRaises (NoPropertiesProvidedException ):
313- IdentifiableAction ()
314-
315306 def test_same (self ) -> None :
316307 ts = datetime .datetime .utcnow ()
317308 ia_1 = IdentifiableAction (
timestamp = ts ,
name = 'A Name' ,
email = '[email protected] ' )
You can’t perform that action at this time.
0 commit comments