mirror of https://github.com/MISP/misp-modules
fix: Fixed ipasn test input format + module version updated
parent
8db9891c83
commit
31a74a10c1
|
@ -6,7 +6,7 @@ from pymisp import MISPAttribute, MISPEvent, MISPObject
|
||||||
|
|
||||||
misperrors = {'error': 'Error'}
|
misperrors = {'error': 'Error'}
|
||||||
mispattributes = {'input': ['ip-src', 'ip-dst'], 'format': 'misp_standard'}
|
mispattributes = {'input': ['ip-src', 'ip-dst'], 'format': 'misp_standard'}
|
||||||
moduleinfo = {'version': '0.1', 'author': 'Raphaël Vinot',
|
moduleinfo = {'version': '0.2', 'author': 'Raphaël Vinot',
|
||||||
'description': 'Query an IP ASN history service (https://github.com/CIRCL/IP-ASN-history.git)',
|
'description': 'Query an IP ASN history service (https://github.com/CIRCL/IP-ASN-history.git)',
|
||||||
'module-type': ['expansion', 'hover']}
|
'module-type': ['expansion', 'hover']}
|
||||||
|
|
||||||
|
|
|
@ -235,7 +235,10 @@ class TestExpansions(unittest.TestCase):
|
||||||
self.assertTrue(value.startswith('{"ip":"1.1.1.1","status":"ok"'))
|
self.assertTrue(value.startswith('{"ip":"1.1.1.1","status":"ok"'))
|
||||||
|
|
||||||
def test_ipasn(self):
|
def test_ipasn(self):
|
||||||
query = {"module": "ipasn", "ip-dst": "1.1.1.1"}
|
query = {"module": "ipasn",
|
||||||
|
"attribute": {"type": "ip-src",
|
||||||
|
"value": "149.13.33.14",
|
||||||
|
"uuid": "ea89a33b-4ab7-4515-9f02-922a0bee333d"}}
|
||||||
response = self.misp_modules_post(query)
|
response = self.misp_modules_post(query)
|
||||||
self.assertEqual(self.get_object(response), 'asn')
|
self.assertEqual(self.get_object(response), 'asn')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue