Minor fixes to tests. Some datastore had strange parameters in calls.

Fix error values for CustomMarking and fix incorrect test data
stix2.1
Emmanuelle Vargas-Gonzalez 2018-07-09 15:20:04 -04:00
parent 646d941032
commit 0197f9fd17
5 changed files with 5 additions and 6 deletions

View File

@ -670,7 +670,7 @@ def test_custom_extension():
with pytest.raises(stix2.exceptions.MissingPropertiesError) as excinfo:
NewExtension(property2=42)
assert excinfo.value.properties == ['property1']
assert str(excinfo.value) == "No values for required properties for _Custom: (property1)."
assert str(excinfo.value) == "No values for required properties for _CustomExtension: (property1)."
with pytest.raises(ValueError) as excinfo:
NewExtension(property1='something', property2=4)

View File

@ -421,7 +421,7 @@ def test_filesystem_object_with_custom_property(fs_store):
x_empire="Roman",
allow_custom=True)
fs_store.add(camp, True)
fs_store.add(camp)
camp_r = fs_store.get(camp.id)
assert camp_r.id == camp.id

View File

@ -14,8 +14,7 @@ stix_objs = [
],
"modified": "2017-01-27T13:49:53.997Z",
"name": "Poison Ivy",
"type": "malware",
"is_family": False
"type": "malware"
},
{
"created": "2014-05-08T09:00:00.000Z",

View File

@ -674,7 +674,7 @@ def test_custom_extension():
with pytest.raises(stix2.exceptions.MissingPropertiesError) as excinfo:
NewExtension(property2=42)
assert excinfo.value.properties == ['property1']
assert str(excinfo.value) == "No values for required properties for _Custom: (property1)."
assert str(excinfo.value) == "No values for required properties for _CustomExtension: (property1)."
with pytest.raises(ValueError) as excinfo:
NewExtension(property1='something', property2=4)

View File

@ -417,7 +417,7 @@ def test_filesystem_object_with_custom_property(fs_store):
x_empire="Roman",
allow_custom=True)
fs_store.add(camp, True)
fs_store.add(camp)
camp_r = fs_store.get(camp.id)
assert camp_r.id == camp.id