diff --git a/stix2/test/v20/test_custom.py b/stix2/test/v20/test_custom.py index 5a29873..e4b5377 100644 --- a/stix2/test/v20/test_custom.py +++ b/stix2/test/v20/test_custom.py @@ -168,7 +168,7 @@ def test_custom_property_in_observed_data(): allow_custom=True, first_observed="2015-12-21T19:00:00Z", last_observed="2015-12-21T19:00:00Z", - number_observed=0, + number_observed=1, objects={"0": artifact}, ) @@ -190,7 +190,7 @@ def test_custom_property_object_in_observable_extension(): allow_custom=True, first_observed="2015-12-21T19:00:00Z", last_observed="2015-12-21T19:00:00Z", - number_observed=0, + number_observed=1, objects={"0": artifact}, ) @@ -225,7 +225,7 @@ def test_custom_property_dict_in_observable_extension(): allow_custom=True, first_observed="2015-12-21T19:00:00Z", last_observed="2015-12-21T19:00:00Z", - number_observed=0, + number_observed=1, objects={"0": artifact}, ) diff --git a/stix2/v20/sdo.py b/stix2/v20/sdo.py index 40c987e..3fcfed0 100644 --- a/stix2/v20/sdo.py +++ b/stix2/v20/sdo.py @@ -203,7 +203,7 @@ class ObservedData(STIXDomainObject): ('modified', TimestampProperty(default=lambda: NOW, precision='millisecond')), ('first_observed', TimestampProperty(required=True)), ('last_observed', TimestampProperty(required=True)), - ('number_observed', IntegerProperty(required=True)), + ('number_observed', IntegerProperty(min=1, max=999999999, required=True)), ('objects', ObservableProperty(required=True)), ('revoked', BooleanProperty(default=lambda: False)), ('labels', ListProperty(StringProperty)), diff --git a/stix2/v20/sro.py b/stix2/v20/sro.py index 9abb38a..dbf6812 100644 --- a/stix2/v20/sro.py +++ b/stix2/v20/sro.py @@ -64,7 +64,7 @@ class Sighting(STIXRelationshipObject): ('modified', TimestampProperty(default=lambda: NOW, precision='millisecond')), ('first_seen', TimestampProperty()), ('last_seen', TimestampProperty()), - ('count', IntegerProperty()), + ('count', IntegerProperty(min=0, max=999999999)), ('sighting_of_ref', ReferenceProperty(required=True)), ('observed_data_refs', ListProperty(ReferenceProperty(type='observed-data'))), ('where_sighted_refs', ListProperty(ReferenceProperty(type='identity'))),