Skip to content

Commit

Permalink
chg: Add testcase with breakOnDuplicate in a MISPObject
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Jan 21, 2021
1 parent 7b64c1c commit 5b97b7d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testlive_comprehensive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,11 @@ def test_add_event_with_attachment_object_controller(self):
r = self.user_misp_connector.add_object(first, peo_dup, break_on_duplicate=True)
self.assertTrue("Duplicate object found" in r['errors'][1]['errors'], r)

# Test break on duplicate with breakOnDuplicate key in object
fo_dup.breakOnDuplicate = True
r = self.user_misp_connector.add_object(first, fo_dup)
self.assertTrue("Duplicate object found" in r['errors'][1]['errors'], r)

# Test refs
r = self.user_misp_connector.add_object_reference(fo.ObjectReference[0])
self.assertEqual(r.object_uuid, fo.uuid, r.to_json())
Expand Down

0 comments on commit 5b97b7d

Please sign in to comment.