Fix some testing
parent
c911cff97f
commit
897e884217
|
@ -1,4 +1,4 @@
|
|||
sudo: false
|
||||
os: linux
|
||||
language: python
|
||||
cache: pip
|
||||
dist: xenial
|
||||
|
|
|
@ -324,12 +324,9 @@ def _register_observable_extension(
|
|||
OBJ_MAP_OBSERVABLE = STIX2_OBJ_MAPS[v]['observables']
|
||||
EXT_MAP = STIX2_OBJ_MAPS[v]['observable-extensions']
|
||||
|
||||
try:
|
||||
try:
|
||||
if ext_type in EXT_MAP[observable_type].keys():
|
||||
raise DuplicateRegistrationError("Observable Extension", ext_type)
|
||||
except AttributeError:
|
||||
pass
|
||||
EXT_MAP[observable_type][ext_type] = new_extension
|
||||
except KeyError:
|
||||
if observable_type not in OBJ_MAP_OBSERVABLE:
|
||||
|
|
|
@ -1080,8 +1080,7 @@ def test_register_duplicate_observable_with_version():
|
|||
assert "cannot be registered again" in str(excinfo.value)
|
||||
|
||||
|
||||
@pytest.mark.xfail(reason="The default version is no longer 2.0", condition=stix2.DEFAULT_VERSION != "2.0")
|
||||
def test_register_marking_with_no_version():
|
||||
def test_register_marking_with_version():
|
||||
@stix2.v20.CustomMarking(
|
||||
'x-new-obj-2', [
|
||||
('property1', stix2.properties.StringProperty(required=True)),
|
||||
|
|
Loading…
Reference in New Issue