Update immutable tests.

stix2.1
Emmanuelle Vargas-Gonzalez 2017-06-01 12:43:42 -04:00
parent 49f58ff513
commit ad46474663
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: with pytest.raises(stix2.exceptions.ImmutableError) as excinfo:
indicator.valid_from = dt.datetime.now() indicator.valid_from = dt.datetime.now()
assert str(excinfo.value) == "Cannot modify properties after creation." assert str(excinfo.value) == "Cannot modify 'valid_from' property in <class 'stix2.sdo.Indicator'> after creation."
def test_invalid_kwarg_to_indicator(): 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: with pytest.raises(stix2.exceptions.ImmutableError) as excinfo:
malware.name = "Cryptolocker II" malware.name = "Cryptolocker II"
assert str(excinfo.value) == "Cannot modify properties after creation." assert str(excinfo.value) == "Cannot modify 'name' property in <class 'stix2.sdo.Malware'> after creation."
def test_invalid_kwarg_to_malware(): 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: with pytest.raises(stix2.exceptions.ImmutableError) as excinfo:
relationship.relationship_type = "derived-from" relationship.relationship_type = "derived-from"
assert str(excinfo.value) == "Cannot modify properties after creation." assert str(excinfo.value) == "Cannot modify 'relationship_type' property in <class 'stix2.sro.Relationship'> after creation."
def test_invalid_kwarg_to_relationship(): def test_invalid_kwarg_to_relationship():