Update test_expansions.py

pull/554/head
Rambatla Venkat Rao 2022-02-12 11:14:57 +05:30 committed by GitHub
parent 8c1db02a65
commit 0d63c5e0a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 10 deletions

View File

@ -296,22 +296,14 @@ class TestExpansions(unittest.TestCase):
def test_ipqs_fraud_and_risk_scoring(self):
module_name = "ipqs_fraud_and_risk_scoring"
query = {"module": module_name,
"attribute": {"type": "domain",
"attribute": {"type": "email",
"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."
)
)
self.assertEqual(self.get_values(response), 'noreply@ipqualityscore.com')
else:
response = self.misp_modules_post(query)
self.assertEqual(self.get_errors(response), 'An API key for IPQualityScore is required.')