mirror of https://github.com/MISP/misp-modules
Update test_expansions.py
parent
3856f9fe1d
commit
e7645a195a
|
@ -293,6 +293,29 @@ class TestExpansions(unittest.TestCase):
|
|||
response = self.misp_modules_post(query)
|
||||
self.assertEqual(self.get_object(response), 'asn')
|
||||
|
||||
def test_ipqs_fraud_and_risk_scoring(self):
|
||||
module_name = "ipqs_fraud_and_risk_scoring"
|
||||
query = {"module": module_name,
|
||||
"attribute": {"type": "domain",
|
||||
"value": "noreply@ipqualityscore.com",
|
||||
"uuid": "ea89a33b-4ab7-4515-9f02-922a0bee333d"},
|
||||
"config": {}}
|
||||
if module_name in self.configs:
|
||||
query['config'] = self.configs[module_name]
|
||||
response = self.misp_modules_post(query)
|
||||
try:
|
||||
self.assertEqual(self.get_object(response), 'IPQS:)
|
||||
except Exception:
|
||||
self.assertIn(
|
||||
self.get_errors(response),
|
||||
(
|
||||
"Invalid or unauthorized key. Please check the API key and try again."
|
||||
)
|
||||
)
|
||||
else:
|
||||
response = self.misp_modules_post(query)
|
||||
self.assertEqual(self.get_errors(response), 'An API key for IPQualityScore is required.')
|
||||
|
||||
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