chg: Fix testing

pull/265/head
Raphaël Vinot 2018-08-21 11:35:36 +02:00
parent 3ee90602ea
commit 11aaebb5df
1 changed files with 2 additions and 2 deletions

View File

@ -163,9 +163,9 @@ class TestComprehensive(unittest.TestCase):
attributes_types_search = self.admin_misp_connector.build_complex_query(or_parameters=['ip-src', 'ip-dst']) attributes_types_search = self.admin_misp_connector.build_complex_query(or_parameters=['ip-src', 'ip-dst'])
events = self.admin_misp_connector.search(timestamp=first.timestamp.timestamp(), events = self.admin_misp_connector.search(timestamp=first.timestamp.timestamp(),
type_attribute=attributes_types_search) type_attribute=attributes_types_search)
self.assertEqual(len(events), 1) self.assertEqual(len(events), 2)
for e in events: for e in events:
self.assertIn(e.id, [third.id]) self.assertIn(e.id, [second.id, third.id])
finally: finally:
# Delete event # Delete event
self.admin_misp_connector.delete_event(first.id) self.admin_misp_connector.delete_event(first.id)