Skip to content

Commit

Permalink
fix; [tests] Changes on assertion statements that should fix the pass…
Browse files Browse the repository at this point in the history
…ivetotal, rbl & shodan tests
  • Loading branch information
chrisr3d committed Apr 16, 2021
1 parent dbff9b3 commit 0b7bb58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_expansions.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def test_passivetotal(self):
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:
Expand Down Expand Up @@ -401,7 +401,7 @@ def test_rbl(self):
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")

Expand Down Expand Up @@ -441,7 +441,7 @@ def test_shodan(self):
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')
Expand Down

0 comments on commit 0b7bb58

Please sign in to comment.