From 82aa3c815de4b4b04cbb99e8f0f7413304c51f6a Mon Sep 17 00:00:00 2001 From: Jakub Onderka Date: Tue, 28 Jul 2020 12:26:15 +0200 Subject: [PATCH] fix: test_get_non_exists_event --- tests/testlive_comprehensive.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testlive_comprehensive.py b/tests/testlive_comprehensive.py index ec8a489..bafac7c 100644 --- a/tests/testlive_comprehensive.py +++ b/tests/testlive_comprehensive.py @@ -556,11 +556,11 @@ class TestComprehensive(unittest.TestCase): 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 + event = self.user_misp_connector.get_event(0) # non exists id + self.assertEqual(event['errors'][0], 404) - with self.assertRaises(MISPServerError): - self.user_misp_connector.get_event("ab2b6e28-fda5-4282-bf60-22b81de77851") # non exists uuid + event = self.user_misp_connector.get_event("ab2b6e28-fda5-4282-bf60-22b81de77851") # non exists uuid + self.assertEqual(event['errors'][0], 404) def test_delete_by_uuid(self): try: