Skip to content

Commit 0b7bb58

Browse files
committed
fix; [tests] Changes on assertion statements that should fix the passivetotal, rbl & shodan tests
1 parent dbff9b3 commit 0b7bb58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_expansions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def test_passivetotal(self):
357357
query["config"] = self.configs[module_name]
358358
response = self.misp_modules_post(query)
359359
try:
360-
self.assertEqual(self.get_values(response), 'circl.lu')
360+
self.assertIn('www.circl.lu', response.json()['results'][0]['values'])
361361
except Exception:
362362
self.assertIn(self.get_errors(response), ('We hit an error, time to bail!', 'API quota exceeded.'))
363363
else:
@@ -401,7 +401,7 @@ def test_rbl(self):
401401
query = {"module": "rbl", "ip-src": "8.8.8.8"}
402402
response = self.misp_modules_post(query)
403403
try:
404-
self.assertTrue(self.get_values(response).startswith('8.8.8.8.query.senderbase.org'))
404+
self.assertTrue(self.get_values(response).startswith('8.8.8.8.bl.spamcannibal.org'))
405405
except Exception:
406406
self.assertEqual(self.get_errors(response), "No data found by querying known RBLs")
407407

@@ -441,7 +441,7 @@ def test_shodan(self):
441441
if module_name in self.configs:
442442
query['config'] = self.configs[module_name]
443443
response = self.misp_modules_post(query)
444-
self.assertIn("circl.lu", self.get_values(response))
444+
self.assertEqual(self.get_object(response), 'ip-api-address')
445445
else:
446446
response = self.misp_modules_post(query)
447447
self.assertEqual(self.get_errors(response), 'Shodan authentication is missing')

0 commit comments

Comments
 (0)