Pre-commit changes. Also remove a dupe test function which

slipped through due to a rather complex rebase... not too
surprising I missed it.
pull/1/head
Michael Chisholm 2020-07-06 22:43:25 -04:00
parent 414694d8fa
commit 62ee2b2b0a
3 changed files with 3 additions and 17 deletions

View File

@ -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,

View File

@ -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'

View File

@ -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",