def test_register_marking_with_no_version(): # Uses default version (2.0 in this case) core._register_marking(stix2.v21.TLP_WHITE.__class__) v = 'v21' assert stix2.v21.TLP_WHITE.definition._type in core.STIX2_OBJ_MAPS[v]['markings'] assert v in str(stix2.v21.TLP_WHITE.__class__)
def test_register_marking_with_version(): core._register_marking(stix2.v20.TLP_WHITE.__class__, version='2.0') v = 'v20' assert stix2.v20.TLP_WHITE.definition._type in core.STIX2_OBJ_MAPS[v][ 'markings'] assert v in str(stix2.v20.TLP_WHITE.__class__)