Browse Source

fix: Travis tests should be happy now

pull/340/head
chrisr3d 2 years ago
parent
commit
b9b78d1606
No known key found for this signature in database GPG Key ID: 6BBED1B63A6D639F
  1. 2
      misp_modules/modules/expansion/cve.py
  2. 2
      tests/test_expansions.py

2
misp_modules/modules/expansion/cve.py

@ -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)

2
tests/test_expansions.py

@ -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…
Cancel
Save