fix: Fixed ipasn test input format + module version updated

pull/363/head
chrisr3d 2020-01-10 15:37:54 +01:00
parent 8db9891c83
commit 31a74a10c1
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
2 changed files with 5 additions and 2 deletions

View File

@ -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']}

View File

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