diff --git a/stix2/test/test_properties.py b/stix2/test/test_properties.py index 60a42e6..ea9a003 100644 --- a/stix2/test/test_properties.py +++ b/stix2/test/test_properties.py @@ -3,10 +3,9 @@ import datetime as dt import pytest import pytz -import stix2 from stix2.base import _STIXBase from stix2.exceptions import ( - ExtraPropertiesError, STIXError, CustomContentError, + CustomContentError, ExtraPropertiesError, STIXError, ) from stix2.properties import ( BinaryProperty, BooleanProperty, EmbeddedObjectProperty, EnumProperty, diff --git a/stix2/test/v20/test_properties.py b/stix2/test/v20/test_properties.py index 4dbc437..0158f9a 100644 --- a/stix2/test/v20/test_properties.py +++ b/stix2/test/v20/test_properties.py @@ -9,14 +9,13 @@ from stix2.exceptions import ( ) from stix2.properties import ( DictionaryProperty, EmbeddedObjectProperty, ExtensionsProperty, - HashesProperty, ListProperty, ObservableProperty, ReferenceProperty, - STIXObjectProperty, IDProperty, + HashesProperty, IDProperty, ListProperty, ObservableProperty, + ReferenceProperty, STIXObjectProperty, ) from stix2.v20.common import MarkingProperty from . import constants - ID_PROP = IDProperty('my-type', spec_version="2.0") MY_ID = 'my-type--232c9d3f-49fc-4440-bb01-607f638778e7' diff --git a/stix2/test/v21/test_custom.py b/stix2/test/v21/test_custom.py index 1f86a27..e51d76a 100644 --- a/stix2/test/v21/test_custom.py +++ b/stix2/test/v21/test_custom.py @@ -1414,18 +1414,6 @@ def test_register_duplicate_observable_extension(): assert "cannot be registered again" in str(excinfo.value) -def test_register_duplicate_marking(): - with pytest.raises(DuplicateRegistrationError) as excinfo: - @stix2.v21.CustomMarking( - 'x-new-obj', [ - ('property1', stix2.properties.StringProperty(required=True)), - ], - ) - class NewObj2(): - pass - assert "cannot be registered again" in str(excinfo.value) - - def test_allow_custom_propagation(): obj_dict = { "type": "bundle",