modify test to cover exception message
parent
b3a601e4c8
commit
4b21708e03
|
@ -71,13 +71,15 @@ def test_bad_created_marking_tlp_amber():
|
|||
|
||||
|
||||
def test_bad_created_marking_tlp_red():
|
||||
with pytest.raises(exceptions.TLPMarkingDefinitionError):
|
||||
with pytest.raises(exceptions.TLPMarkingDefinitionError) as excinfo:
|
||||
MarkingDefinition(
|
||||
id='marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed',
|
||||
definition_type='tlp',
|
||||
definition=TLPMarking(tlp='red'),
|
||||
)
|
||||
|
||||
assert "marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed" in str(excinfo.value)
|
||||
|
||||
|
||||
def test_successful_tlp_white():
|
||||
white = MarkingDefinition(
|
||||
|
|
|
@ -71,13 +71,15 @@ def test_bad_created_marking_tlp_amber():
|
|||
|
||||
|
||||
def test_bad_created_marking_tlp_red():
|
||||
with pytest.raises(exceptions.TLPMarkingDefinitionError):
|
||||
with pytest.raises(exceptions.TLPMarkingDefinitionError) as excinfo:
|
||||
MarkingDefinition(
|
||||
id='marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed',
|
||||
definition_type='tlp',
|
||||
definition=TLPMarking(tlp='red'),
|
||||
)
|
||||
|
||||
assert "marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed" in str(excinfo.value)
|
||||
|
||||
|
||||
def test_successful_tlp_white():
|
||||
white = MarkingDefinition(
|
||||
|
|
Loading…
Reference in New Issue