Modules for expansion services, import and export in MISP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

6 years ago
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import requests
import base64
import json
6 years ago
class TestModules(unittest.TestCase):
def setUp(self):
self.maxDiff = None
self.headers = {'Content-Type': 'application/json'}
self.url = ""
6 years ago
def test_introspection(self):
response = requests.get(self.url + "modules")
6 years ago
def test_cve(self):
with open('tests/bodycve.json', 'r') as f:
response = + "query",
6 years ago
def test_dns(self):
with open('tests/body.json', 'r') as f:
response = + "query",
def test_stix(self):
with open("tests/stix.xml", "r") as f:
data = json.dumps({"module":"stiximport",
"data":str(base64.b64encode(bytes(, 'utf-8')), 'utf-8')
response = + "query", data=data)
6 years ago
if __name__ == '__main__':