Fix v21 ExtensionDefinition class to use the enum constant from

the vocab module for extension-type-enum, instead of replicating
that list.
pull/1/head
Michael Chisholm 2021-06-25 22:06:52 -04:00
parent e17f3e6c1c
commit 47b864cb4d
1 changed files with 2 additions and 8 deletions

View File

@ -14,7 +14,7 @@ from ..properties import (
) )
from ..utils import NOW, _get_dict from ..utils import NOW, _get_dict
from .base import _STIXBase21 from .base import _STIXBase21
from .vocab import HASHING_ALGORITHM from .vocab import HASHING_ALGORITHM, EXTENSION_TYPE
class ExternalReference(_STIXBase21): class ExternalReference(_STIXBase21):
@ -126,13 +126,7 @@ class ExtensionDefinition(_STIXBase21):
( (
'extension_types', ListProperty( 'extension_types', ListProperty(
EnumProperty( EnumProperty(
allowed=[ allowed=EXTENSION_TYPE,
'new-sdo',
'new-sco',
'new-sro',
'property-extension',
'toplevel-property-extension',
],
), required=True, ), required=True,
), ),
), ),