Fix properties spec version back to 2.1, and re-adjust tests. Fixes #338
parent
36f7035785
commit
8885a757cb
|
@ -8,6 +8,7 @@ import stix2.utils
|
|||
|
||||
COA_WITH_BIN_JSON = """{
|
||||
"type": "course-of-action",
|
||||
"spec_version": "2.1",
|
||||
"id": "course-of-action--8e2e2d2b-17d4-4cbf-938f-98ee46b3cd3f",
|
||||
"created_by_ref": "identity--311b2d2d-f010-4473-83ec-1edf84858f4c",
|
||||
"created": "2016-04-06T20:03:48.000Z",
|
||||
|
@ -19,6 +20,7 @@ COA_WITH_BIN_JSON = """{
|
|||
|
||||
COA_WITH_REF_JSON = """{
|
||||
"type": "course-of-action",
|
||||
"spec_version": "2.1",
|
||||
"id": "course-of-action--8e2e2d2b-17d4-4cbf-938f-98ee46b3cd3f",
|
||||
"created_by_ref": "identity--311b2d2d-f010-4473-83ec-1edf84858f4c",
|
||||
"created": "2016-04-06T20:03:48.000Z",
|
||||
|
|
|
@ -98,8 +98,9 @@ class CourseOfAction(STIXDomainObject):
|
|||
_type = 'course-of-action'
|
||||
_properties = OrderedDict([
|
||||
('type', TypeProperty(_type)),
|
||||
('id', IDProperty(_type, spec_version='2.0')),
|
||||
('created_by_ref', ReferenceProperty(valid_types='identity', spec_version='2.0')),
|
||||
('spec_version', StringProperty(fixed='2.1')),
|
||||
('id', IDProperty(_type, spec_version='2.1')),
|
||||
('created_by_ref', ReferenceProperty(valid_types='identity', spec_version='2.1')),
|
||||
('created', TimestampProperty(default=lambda: NOW, precision='millisecond')),
|
||||
('modified', TimestampProperty(default=lambda: NOW, precision='millisecond')),
|
||||
('name', StringProperty(required=True)),
|
||||
|
@ -107,7 +108,7 @@ class CourseOfAction(STIXDomainObject):
|
|||
('revoked', BooleanProperty(default=lambda: False)),
|
||||
('labels', ListProperty(StringProperty)),
|
||||
('external_references', ListProperty(ExternalReference)),
|
||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.0'))),
|
||||
('object_marking_refs', ListProperty(ReferenceProperty(valid_types='marking-definition', spec_version='2.1'))),
|
||||
('granular_markings', ListProperty(GranularMarking)),
|
||||
])
|
||||
|
||||
|
|
Loading…
Reference in New Issue