From a7e523ab6135081743c0dd2f8fb58e59ffcb53ae Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Wed, 16 Oct 2019 22:00:36 +0200 Subject: [PATCH] add: threatminer module test --- tests/test_expansions.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_expansions.py b/tests/test_expansions.py index 3776a19..50249ef 100644 --- a/tests/test_expansions.py +++ b/tests/test_expansions.py @@ -164,6 +164,15 @@ class TestExpansions(unittest.TestCase): response = self.misp_modules_post(query) self.assertTrue(self.get_values(response), [result]) + def test_threatminer(self): + query_types = ('domain', 'ip-src', 'md5') + query_values = ('circl.lu', '149.13.33.4', 'b538dbc6160ef54f755a540e06dc27cd980fc4a12005e90b3627febb44a1a90f') + results = ('149.13.33.14', 'f6ecb9d5c21defb1f622364a30cb8274f817a1a2', 'http://www.circl.lu') + for query_type, query_value, result in zip(query_types, query_values, results): + query = {"module": "threatminer", query_type: query_value} + response = self.misp_modules_post(query) + self.assertTrue(self.get_values(response), [result]) + def test_wikidata(self): query = {"module": "wiki", "text": "Google"} response = self.misp_modules_post(query)