From 543a8c0aadff7431c3213588f591b531e8efafff Mon Sep 17 00:00:00 2001 From: Rambatla Venkat Rao <68921481+RamboV@users.noreply.github.com> Date: Tue, 6 Sep 2022 16:47:51 +0530 Subject: [PATCH] added hyas test case --- tests/test_expansions.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_expansions.py b/tests/test_expansions.py index 9f11f8c..0a7bcf7 100644 --- a/tests/test_expansions.py +++ b/tests/test_expansions.py @@ -263,6 +263,21 @@ class TestExpansions(unittest.TestCase): self.assertEqual(to_check, 'OK (Not Found)', response) else: self.assertEqual(self.get_errors(response), 'Have I Been Pwned authentication is incomplete (no API key)') + + def test_hyasinsight(self): + module_name = "hyasinsight" + query = {"module": module_name, + "attribute": {"type": "phone-number", + "value": "+84853620279", + "uuid": "b698dc2b-94c1-487d-8b65-3114bad5a40c"}, + "config": {}} + if module_name in self.configs: + query['config'] = self.configs[module_name] + response = self.misp_modules_post(query) + self.assertEqual(self.get_values(response)['domain'], 'tienichphongnet.com') + else: + response = self.misp_modules_post(query) + self.assertEqual(self.get_errors(response), 'HYAS Insight apikey is missing') def test_greynoise(self): module_name = 'greynoise' @@ -308,6 +323,7 @@ class TestExpansions(unittest.TestCase): response = self.misp_modules_post(query) self.assertEqual(self.get_errors(response), 'IPQualityScore apikey is missing') + def test_macaddess_io(self): module_name = 'macaddress_io' query = {"module": module_name, "mac-address": "44:38:39:ff:ef:57"}