bd897c9848
Previously the requirement that properties ending in `_ref(s)` were instances of an appropriate type capable of containing a STIX `identifier` (the current interpretation of section 3.1 of the STIX 2.1 spec) was only enforced for custom observables. This change refactors the property checks for custom objects to enforce this and the STIX 2.1 property name requirement (also from section 3.1) in a common helper, therefore extending the enforcement of both requirements to all custom object types created by downstream projects. There is a special case carved out for STIX 2.0 observables which are required to contain "object references" rather than identifiers. This special logic is encoded in the reference property validation helper and enabled by a kwarg which is passed exclusively by the custom observable registration helper. |
||
---|---|---|
.. | ||
v20 | ||
v21 | ||
__init__.py | ||
test_hashes.py | ||
test_pattern_equivalence.py | ||
test_properties.py | ||
test_spec_version_detect.py | ||
test_utils_type_checks.py | ||
test_workbench.py |