update check_tlp_marking() to contain new representation for TLP markings
parent
9463884170
commit
6f4e819c73
|
@ -271,8 +271,8 @@ def check_tlp_marking(marking_obj, spec_version):
|
||||||
else:
|
else:
|
||||||
w = (
|
w = (
|
||||||
'{"created": "2017-01-20T00:00:00.000Z", "definition": {"tlp": "white"}, "definition_type": "tlp",'
|
'{"created": "2017-01-20T00:00:00.000Z", "definition": {"tlp": "white"}, "definition_type": "tlp",'
|
||||||
' "id": "marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9", "type": "marking-definition",'
|
' "id": "marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9", "name": "TLP:WHITE",'
|
||||||
' "spec_version": "2.1"}'
|
' "type": "marking-definition", "spec_version": "2.1"}'
|
||||||
)
|
)
|
||||||
if marking_obj["id"] != "marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9":
|
if marking_obj["id"] != "marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9":
|
||||||
raise exceptions.TLPMarkingDefinitionError(marking_obj["id"], w)
|
raise exceptions.TLPMarkingDefinitionError(marking_obj["id"], w)
|
||||||
|
@ -288,8 +288,8 @@ def check_tlp_marking(marking_obj, spec_version):
|
||||||
else:
|
else:
|
||||||
g = (
|
g = (
|
||||||
'{"created": "2017-01-20T00:00:00.000Z", "definition": {"tlp": "green"}, "definition_type": "tlp",'
|
'{"created": "2017-01-20T00:00:00.000Z", "definition": {"tlp": "green"}, "definition_type": "tlp",'
|
||||||
' "id": "marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da", "type": "marking-definition",'
|
' "id": "marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da", "name": "TLP:GREEN",'
|
||||||
' "spec_version": "2.1"}'
|
' "type": "marking-definition", "spec_version": "2.1"}'
|
||||||
)
|
)
|
||||||
if marking_obj["id"] != "marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da":
|
if marking_obj["id"] != "marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da":
|
||||||
raise exceptions.TLPMarkingDefinitionError(marking_obj["id"], g)
|
raise exceptions.TLPMarkingDefinitionError(marking_obj["id"], g)
|
||||||
|
@ -305,8 +305,8 @@ def check_tlp_marking(marking_obj, spec_version):
|
||||||
else:
|
else:
|
||||||
a = (
|
a = (
|
||||||
'{"created": "2017-01-20T00:00:00.000Z", "definition": {"tlp": "amber"}, "definition_type": "tlp",'
|
'{"created": "2017-01-20T00:00:00.000Z", "definition": {"tlp": "amber"}, "definition_type": "tlp",'
|
||||||
' "id": "marking-definition--f88d31f6-486f-44da-b317-01333bde0b82", "type": "marking-definition",'
|
' "id": "marking-definition--f88d31f6-486f-44da-b317-01333bde0b82", "name": "TLP:AMBER",'
|
||||||
' "spec_version": "2.1"}'
|
' "type": "marking-definition", "spec_version": "2.1"}'
|
||||||
)
|
)
|
||||||
if marking_obj["id"] != "marking-definition--f88d31f6-486f-44da-b317-01333bde0b82":
|
if marking_obj["id"] != "marking-definition--f88d31f6-486f-44da-b317-01333bde0b82":
|
||||||
raise exceptions.TLPMarkingDefinitionError(marking_obj["id"], a)
|
raise exceptions.TLPMarkingDefinitionError(marking_obj["id"], a)
|
||||||
|
@ -322,8 +322,8 @@ def check_tlp_marking(marking_obj, spec_version):
|
||||||
else:
|
else:
|
||||||
r = (
|
r = (
|
||||||
'{"created": "2017-01-20T00:00:00.000Z", "definition": {"tlp": "red"}, "definition_type": "tlp",'
|
'{"created": "2017-01-20T00:00:00.000Z", "definition": {"tlp": "red"}, "definition_type": "tlp",'
|
||||||
' "id": "marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed", "type": "marking-definition",'
|
' "id": "marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed", "name": "TLP:RED",'
|
||||||
' "spec_version": "2.1"}'
|
' "type": "marking-definition", "spec_version": "2.1"}'
|
||||||
)
|
)
|
||||||
if marking_obj["id"] != "marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed":
|
if marking_obj["id"] != "marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed":
|
||||||
raise exceptions.TLPMarkingDefinitionError(marking_obj["id"], r)
|
raise exceptions.TLPMarkingDefinitionError(marking_obj["id"], r)
|
||||||
|
|
Loading…
Reference in New Issue