From 0b7bb587be2f17caeeb859152de4d5d1f270334f Mon Sep 17 00:00:00 2001 From: chrisr3d Date: Fri, 16 Apr 2021 22:17:52 +0200 Subject: [PATCH] fix; [tests] Changes on assertion statements that should fix the passivetotal, rbl & shodan tests --- tests/test_expansions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_expansions.py b/tests/test_expansions.py index 60174651..c5b54672 100644 --- a/tests/test_expansions.py +++ b/tests/test_expansions.py @@ -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')