cti-python-stix2/stix2/test
Michael Chisholm c7b4840232 Code style and behavioral improvements in ExtensionsProperty:
- Changed an error message "Cannot determine extension type."
At that point in the code, we in fact have a registered
extension type and the class for it, so it didn't seem to make
any sense.  I changed it to say that an extension of that type
couldn't be created from type of value given.  Because this is
really about typing (in both the old and new code), I also
changed the exception class to TypeError.

- Changed customization behavior: unregistered
"extension-definition--" style extensions are no longer
considered custom.  Their mere presence can no longer be
considered a customization, since it doesn't fit the
criteria, and in fact the extension mechanism is supposed to
supplant the old customization system anyway.  Unregistered
extensions of other types are still considered custom.

- Fixed up unit tests according to the exception message
change.

- Added a unit test for unregistered "extension-definition--"
style extensions.
2021-06-25 22:20:02 -04:00
..
v20 Code style and behavioral improvements in ExtensionsProperty: 2021-06-25 22:20:02 -04:00
v21 Code style and behavioral improvements in ExtensionsProperty: 2021-06-25 22:20:02 -04:00
__init__.py
test_hashes.py Add back usage of spec_version where HashesProperty is used for 2021-03-31 16:20:33 -04:00
test_pattern_equivalence.py
test_properties.py pre-commit stylistic fix 2021-04-14 12:58:09 -04:00
test_spec_version_detect.py
test_utils_type_checks.py
test_workbench.py Initial revamp of customization enforcement and detection. 2021-03-31 15:21:55 -04:00