mirror of https://github.com/MISP/misp-modules
fix: Handling issues when the otx api is queried too often in a short time
parent
0555cdaedf
commit
60ef1901e2
|
@ -118,7 +118,11 @@ class TestExpansions(unittest.TestCase):
|
||||||
for query_type, query_value, result in zip(query_types, query_values, results):
|
for query_type, query_value, result in zip(query_types, query_values, results):
|
||||||
query = {"module": "otx", query_type: query_value, "config": {"apikey": "1"}}
|
query = {"module": "otx", query_type: query_value, "config": {"apikey": "1"}}
|
||||||
response = self.misp_modules_post(query)
|
response = self.misp_modules_post(query)
|
||||||
self.assertTrue(self.get_values(response), [result])
|
try:
|
||||||
|
self.assertTrue(self.get_values(response), [result])
|
||||||
|
except KeyError:
|
||||||
|
# Empty results, which in this case comes from a connection error
|
||||||
|
continue
|
||||||
|
|
||||||
def test_rbl(self):
|
def test_rbl(self):
|
||||||
query = {"module": "rbl", "ip-src": "8.8.8.8"}
|
query = {"module": "rbl", "ip-src": "8.8.8.8"}
|
||||||
|
|
Loading…
Reference in New Issue