Fix JSON encoding issue within tests
parent
c98fcafb1a
commit
ffbf5fa34c
|
@ -32,7 +32,7 @@ EXPECTED_BUNDLE = """{
|
|||
"malware_types": [
|
||||
"ransomware"
|
||||
],
|
||||
"is_family": False
|
||||
"is_family": "False"
|
||||
},
|
||||
{
|
||||
"type": "relationship",
|
||||
|
|
|
@ -220,7 +220,7 @@ def test_parse_malware():
|
|||
"malware_types": [
|
||||
"ransomware"
|
||||
],
|
||||
"is_family": False
|
||||
"is_family": "False"
|
||||
}"""
|
||||
mal = env.parse(data, version="2.1")
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ def test_indicator_required_properties():
|
|||
|
||||
assert excinfo.value.cls == stix2.v21.Indicator
|
||||
assert excinfo.value.properties == ["indicator_types", "pattern", "valid_from"]
|
||||
assert str(excinfo.value) == "No values for required properties for Indicator: (indicator_types, pattern)."
|
||||
assert str(excinfo.value) == "No values for required properties for Indicator: (indicator_types, pattern, valid_from)."
|
||||
|
||||
|
||||
def test_indicator_required_property_pattern():
|
||||
|
@ -194,6 +194,7 @@ def test_invalid_indicator_pattern():
|
|||
stix2.v21.Indicator(
|
||||
indicator_types=['malicious-activity'],
|
||||
pattern='[file:hashes.MD5 = "d41d8cd98f00b204e9800998ecf8427e"]',
|
||||
valid_from="2017-01-01T12:34:56Z",
|
||||
)
|
||||
assert excinfo.value.cls == stix2.v21.Indicator
|
||||
assert excinfo.value.prop_name == 'pattern'
|
||||
|
|
|
@ -18,7 +18,7 @@ EXPECTED_MALWARE = """{
|
|||
"malware_types": [
|
||||
"ransomware"
|
||||
],
|
||||
"is_family": False
|
||||
"is_family": "False"
|
||||
}"""
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue