mirror of https://github.com/MISP/misp-modules
added hyas test case
parent
fcfdd36fd4
commit
543a8c0aad
|
@ -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"}
|
||||
|
|
Loading…
Reference in New Issue