From 15316e79333578285b7df9116bbaffacb33f01ae Mon Sep 17 00:00:00 2001 From: Michael Chisholm Date: Thu, 12 Mar 2020 16:20:32 -0400 Subject: [PATCH] Added "x-" to SCO extension names in unit tests, to illustrate best practice and follow a spec "should" rule. --- stix2/test/v21/test_custom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stix2/test/v21/test_custom.py b/stix2/test/v21/test_custom.py index 8b1a38c..1e6f629 100644 --- a/stix2/test/v21/test_custom.py +++ b/stix2/test/v21/test_custom.py @@ -800,7 +800,7 @@ def test_custom_extension_wrong_observable_type(): ) def test_custom_extension_with_list_and_dict_properties_observable_type(data): @stix2.v21.CustomExtension( - stix2.v21.UserAccount, 'some-extension-ext', [ + stix2.v21.UserAccount, 'x-some-extension-ext', [ ('keys', stix2.properties.ListProperty(stix2.properties.DictionaryProperty, required=True)), ], ) @@ -946,14 +946,14 @@ def test_custom_and_spec_extension_mix(): file_obs = stix2.v21.File( name="my_file.dat", extensions={ - "custom1-ext": { + "x-custom1-ext": { "a": 1, "b": 2, }, "ntfs-ext": { "sid": "S-1-whatever", }, - "custom2-ext": { + "x-custom2-ext": { "z": 99.9, "y": False, }, @@ -966,8 +966,8 @@ def test_custom_and_spec_extension_mix(): allow_custom=True, ) - assert file_obs.extensions["custom1-ext"] == {"a": 1, "b": 2} - assert file_obs.extensions["custom2-ext"] == {"y": False, "z": 99.9} + assert file_obs.extensions["x-custom1-ext"] == {"a": 1, "b": 2} + assert file_obs.extensions["x-custom2-ext"] == {"y": False, "z": 99.9} assert file_obs.extensions["ntfs-ext"].sid == "S-1-whatever" assert file_obs.extensions["raster-image-ext"].image_height == 1024