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 37
37
from sortedcontainers import SortedSet
38
38
39
39
from .._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
46
41
from ..exception .serialization import CycloneDxDeserializationException , SerializationOfUnexpectedValueException
47
42
from ..schema .schema import (
48
43
SchemaVersion1Dot0 ,
@@ -1180,11 +1175,6 @@ def __init__(
1180
1175
name : Optional [str ] = None ,
1181
1176
email : Optional [str ] = None ,
1182
1177
) -> 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
-
1188
1178
self .timestamp = timestamp
1189
1179
self .name = name
1190
1180
self .email = email
Original file line number Diff line number Diff line change 24
24
from ddt import ddt , named_data
25
25
26
26
from 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
33
28
from cyclonedx .model import (
34
29
Copyright ,
35
30
Encoding ,
@@ -308,10 +303,6 @@ def test_sort(self) -> None:
308
303
309
304
class TestModelIdentifiableAction (TestCase ):
310
305
311
- def test_no_params (self ) -> None :
312
- with self .assertRaises (NoPropertiesProvidedException ):
313
- IdentifiableAction ()
314
-
315
306
def test_same (self ) -> None :
316
307
ts = datetime .datetime .utcnow ()
317
308
ia_1 = IdentifiableAction (timestamp = ts , name = 'A Name' , email = 'something@somewhere.tld' )
You can’t perform that action at this time.
0 commit comments