From b10faa653f63024cdd2c96b65bd40bed8567c990 Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Mon, 27 Jul 2020 13:35:47 +0200 Subject: [PATCH] chg: New test_get_non_exists_event --- tests/testlive_comprehensive.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/testlive_comprehensive.py b/tests/testlive_comprehensive.py index e6273b9..49906a6 100644 --- a/tests/testlive_comprehensive.py +++ b/tests/testlive_comprehensive.py @@ -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()