mirror of https://github.com/MISP/misp-modules
fix: Travis tests should be happy now
parent
6bcd60871c
commit
b9b78d1606
|
@ -20,7 +20,7 @@ def handler(q=False):
|
|||
misperrors['error'] = 'Vulnerability id missing'
|
||||
return misperrors
|
||||
|
||||
api_url = check_url(request['config']['custom_API']) if request['config'].get('custom_API') else cveapi_url
|
||||
api_url = check_url(request['config']['custom_API']) if request.get('config') and request['config'].get('custom_API') else cveapi_url
|
||||
r = requests.get("{}{}".format(api_url, request.get('vulnerability')))
|
||||
if r.status_code == 200:
|
||||
vulnerability = json.loads(r.text)
|
||||
|
|
|
@ -50,7 +50,7 @@ class TestExpansions(unittest.TestCase):
|
|||
def test_greynoise(self):
|
||||
query = {"module": "greynoise", "ip-dst": "1.1.1.1"}
|
||||
response = self.misp_modules_post(query)
|
||||
self.assertTrue(self.get_values(response).strartswith('{"ip":"1.1.1.1","status":"ok"'))
|
||||
self.assertTrue(self.get_values(response).startswith('{"ip":"1.1.1.1","status":"ok"'))
|
||||
|
||||
def test_ipasn(self):
|
||||
query = {"module": "ipasn", "ip-dst": "1.1.1.1"}
|
||||
|
|
Loading…
Reference in New Issue