fix; [tests] Changes on assertion statements that should fix the passivetotal, rbl & shodan tests

pull/488/head
chrisr3d 2021-04-16 22:17:52 +02:00
parent dbff9b3aa8
commit 0b7bb587be
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 3 additions and 3 deletions

View File

@ -357,7 +357,7 @@ class TestExpansions(unittest.TestCase):
query["config"] = self.configs[module_name]
response = self.misp_modules_post(query)
try:
self.assertEqual(self.get_values(response), 'circl.lu')
self.assertIn('www.circl.lu', response.json()['results'][0]['values'])
except Exception:
self.assertIn(self.get_errors(response), ('We hit an error, time to bail!', 'API quota exceeded.'))
else:
@ -401,7 +401,7 @@ class TestExpansions(unittest.TestCase):
query = {"module": "rbl", "ip-src": "8.8.8.8"}
response = self.misp_modules_post(query)
try:
self.assertTrue(self.get_values(response).startswith('8.8.8.8.query.senderbase.org'))
self.assertTrue(self.get_values(response).startswith('8.8.8.8.bl.spamcannibal.org'))
except Exception:
self.assertEqual(self.get_errors(response), "No data found by querying known RBLs")
@ -441,7 +441,7 @@ class TestExpansions(unittest.TestCase):
if module_name in self.configs:
query['config'] = self.configs[module_name]
response = self.misp_modules_post(query)
self.assertIn("circl.lu", self.get_values(response))
self.assertEqual(self.get_object(response), 'ip-api-address')
else:
response = self.misp_modules_post(query)
self.assertEqual(self.get_errors(response), 'Shodan authentication is missing')