mirror of https://github.com/MISP/misp-modules
Update test_expansions.py
parent
8c1db02a65
commit
0d63c5e0a2
|
@ -296,22 +296,14 @@ class TestExpansions(unittest.TestCase):
|
||||||
def test_ipqs_fraud_and_risk_scoring(self):
|
def test_ipqs_fraud_and_risk_scoring(self):
|
||||||
module_name = "ipqs_fraud_and_risk_scoring"
|
module_name = "ipqs_fraud_and_risk_scoring"
|
||||||
query = {"module": module_name,
|
query = {"module": module_name,
|
||||||
"attribute": {"type": "domain",
|
"attribute": {"type": "email",
|
||||||
"value": "noreply@ipqualityscore.com",
|
"value": "noreply@ipqualityscore.com",
|
||||||
"uuid": "ea89a33b-4ab7-4515-9f02-922a0bee333d"},
|
"uuid": "ea89a33b-4ab7-4515-9f02-922a0bee333d"},
|
||||||
"config": {}}
|
"config": {}}
|
||||||
if module_name in self.configs:
|
if module_name in self.configs:
|
||||||
query['config'] = self.configs[module_name]
|
query['config'] = self.configs[module_name]
|
||||||
response = self.misp_modules_post(query)
|
response = self.misp_modules_post(query)
|
||||||
try:
|
self.assertEqual(self.get_values(response), 'noreply@ipqualityscore.com')
|
||||||
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:
|
else:
|
||||||
response = self.misp_modules_post(query)
|
response = self.misp_modules_post(query)
|
||||||
self.assertEqual(self.get_errors(response), 'An API key for IPQualityScore is required.')
|
self.assertEqual(self.get_errors(response), 'An API key for IPQualityScore is required.')
|
||||||
|
|
Loading…
Reference in New Issue