Update ImmutableError test cases.

stix2.1
Emmanuelle Vargas-Gonzalez 2017-06-02 07:34:37 -04:00
parent fceef4d85a
commit d579c12172
3 changed files with 3 additions and 3 deletions

View File

@ -129,7 +129,7 @@ def test_cannot_assign_to_indicator_attributes(indicator):
with pytest.raises(stix2.exceptions.ImmutableError) as excinfo:
indicator.valid_from = dt.datetime.now()
assert str(excinfo.value) == "Cannot modify 'valid_from' property in <class 'stix2.sdo.Indicator'> after creation."
assert str(excinfo.value) == "Cannot modify 'valid_from' property in 'Indicator' after creation."
def test_invalid_kwarg_to_indicator():

View File

@ -92,7 +92,7 @@ def test_cannot_assign_to_malware_attributes(malware):
with pytest.raises(stix2.exceptions.ImmutableError) as excinfo:
malware.name = "Cryptolocker II"
assert str(excinfo.value) == "Cannot modify 'name' property in <class 'stix2.sdo.Malware'> after creation."
assert str(excinfo.value) == "Cannot modify 'name' property in 'Malware' after creation."
def test_invalid_kwarg_to_malware():

View File

@ -103,7 +103,7 @@ def test_cannot_assign_to_relationship_attributes(relationship):
with pytest.raises(stix2.exceptions.ImmutableError) as excinfo:
relationship.relationship_type = "derived-from"
assert str(excinfo.value) == "Cannot modify 'relationship_type' property in <class 'stix2.sro.Relationship'> after creation."
assert str(excinfo.value) == "Cannot modify 'relationship_type' property in 'Relationship' after creation."
def test_invalid_kwarg_to_relationship():