mirror of https://github.com/MISP/misp-modules
fix: Fixed ThreatMiner results parsing
parent
dc8a27e2d8
commit
9f7f11107c
|
@ -167,11 +167,11 @@ class TestExpansions(unittest.TestCase):
|
||||||
def test_threatminer(self):
|
def test_threatminer(self):
|
||||||
query_types = ('domain', 'ip-src', 'md5')
|
query_types = ('domain', 'ip-src', 'md5')
|
||||||
query_values = ('circl.lu', '149.13.33.4', 'b538dbc6160ef54f755a540e06dc27cd980fc4a12005e90b3627febb44a1a90f')
|
query_values = ('circl.lu', '149.13.33.4', 'b538dbc6160ef54f755a540e06dc27cd980fc4a12005e90b3627febb44a1a90f')
|
||||||
results = ('149.13.33.14', 'f6ecb9d5c21defb1f622364a30cb8274f817a1a2', 'http://www.circl.lu')
|
results = ('149.13.33.14', 'f6ecb9d5c21defb1f622364a30cb8274f817a1a2', 'http://www.circl.lu/')
|
||||||
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": "threatminer", query_type: query_value}
|
query = {"module": "threatminer", query_type: query_value}
|
||||||
response = self.misp_modules_post(query)
|
response = self.misp_modules_post(query)
|
||||||
self.assertTrue(self.get_values(response), [result])
|
self.assertTrue(self.get_values(response)[0], result)
|
||||||
|
|
||||||
def test_wikidata(self):
|
def test_wikidata(self):
|
||||||
query = {"module": "wiki", "text": "Google"}
|
query = {"module": "wiki", "text": "Google"}
|
||||||
|
|
Loading…
Reference in New Issue