Skip to content

Commit 25f376b

Browse files
committed
Fix maec tests
1 parent 803c370 commit 25f376b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stix/test/extensions/malware/maec_4_1_malware_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,20 +152,20 @@ def test_parsing_maec_fails(self):
152152
try:
153153
STIXPackage.from_xml(PythonMAECInPackageTests.XML_MAEC)
154154
except ImportError as e:
155-
self.assertEqual(str(e), "No module named 'maec'")
155+
self.assertTrue(all(x in str(e) for x in ("No module named", "maec")))
156156

157157
def test_handling_maec_object_fails(self):
158158
try:
159159
MAECInstance().from_dict(PythonMAECTests._full_dict)
160160
except ImportError as e:
161-
self.assertEqual(str(e), "No module named 'maec'")
161+
self.assertTrue(all(x in str(e) for x in ("No module named", "maec")))
162162

163163
def test_setting_maec_property_fails(self):
164164
try:
165165
m = MAECInstance()
166166
m.maec = "foo"
167167
except ImportError as e:
168-
self.assertEqual(str(e), "No module named 'maec'")
168+
self.assertTrue(all(x in str(e) for x in ("No module named", "maec")))
169169

170170

171171
if __name__ == "__main__":

0 commit comments

Comments
 (0)