Merge pull request #605 from JakubOnderka/testlive-non-exists-event

chg: New test_get_non_exists_event
pull/606/head
Raphaël Vinot 2020-07-27 14:25:47 +02:00 committed by GitHub
commit 7ba12d5a69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -555,6 +555,13 @@ class TestComprehensive(unittest.TestCase):
# Delete event
self.admin_misp_connector.delete_event(first)
def test_get_non_exists_event(self):
with self.assertRaises(MISPServerError):
self.user_misp_connector.get_event(0) # non exists id
with self.assertRaises(MISPServerError):
self.user_misp_connector.get_event("ab2b6e28-fda5-4282-bf60-22b81de77851") # non exists uuid
def test_delete_by_uuid(self):
try:
first = self.create_simple_event()