rename the Class auto-naming from 'STIXExtension' to 'ExtensionDefinition'

pull/1/head
Emmanuelle Vargas-Gonzalez 2020-12-23 16:07:30 -05:00
parent a3fce3686a
commit 6a6f13c37b
4 changed files with 4 additions and 4 deletions

View File

@ -1449,7 +1449,7 @@ def test_registered_new_extension_sdo_allow_custom_false():
'some_property_name1': 'value1',
'some_property_name2': 'value2',
# 'extensions': {
# 'extension-definition--d83fce45-ef58-4c6c-a3f4-1fbc32e9999': STIXExtensiond83fce45ef584c6ca3f41fbc32e98c6e()
# 'extension-definition--d83fce45-ef58-4c6c-a3f4-1fbc32e9999': ExtensionDefinitiond83fce45ef584c6ca3f41fbc32e98c6e()
# }
}
sdo_object = stix2.parse(my_favorite_sdo)

View File

@ -259,7 +259,7 @@ def CustomMarking(type='x-custom-marking', properties=None, extension_name=None)
extension = extension_name.split('--')[1]
extension = extension.replace('-', '')
NameExtension.__name__ = 'STIXExtension' + extension
NameExtension.__name__ = 'ExtensionDefinition' + extension
cls.with_extension = extension_name
return _custom_marking_builder(cls, type, properties, '2.1', _STIXBase21)
return wrapper

View File

@ -950,7 +950,7 @@ def CustomObservable(type='x-custom-observable', properties=None, id_contrib_pro
extension = extension_name.split('--')[1]
extension = extension.replace('-', '')
NameExtension.__name__ = 'STIXExtension' + extension
NameExtension.__name__ = 'ExtensionDefinition' + extension
cls.with_extension = extension_name
return _custom_observable_builder(cls, type, _properties, '2.1', _Observable, id_contrib_props)
return wrapper

View File

@ -866,7 +866,7 @@ def CustomObject(type='x-custom-type', properties=None, extension_name=None):
extension = extension_name.split('--')[1]
extension = extension.replace('-', '')
NameExtension.__name__ = 'STIXExtension' + extension
NameExtension.__name__ = 'ExtensionDefinition' + extension
cls.with_extension = extension_name
return _custom_object_builder(cls, type, _properties, '2.1', _DomainObject)