mirror of https://github.com/MISP/misp-modules
add: Added qrcode module test with its test image
parent
3277a23d92
commit
969d8b627d
|
@ -294,6 +294,14 @@ class TestExpansions(unittest.TestCase):
|
|||
response = self.misp_modules_post(query)
|
||||
self.assertEqual(self.get_values(response), '\npptx test\n')
|
||||
|
||||
def test_qrcode(self):
|
||||
filename = 'qrcode.jpeg'
|
||||
with open(f'{self.dirname}/test_files/{filename}', 'rb') as f:
|
||||
encoded = b64encode(f.read()).decode()
|
||||
query = {"module": "qrcode", "attachment": filename, "data": encoded}
|
||||
response = self.misp_modules_post(query)
|
||||
self.assertEqual(self.get_values(response), '1GXZ6v7FZzYBEnoRaG77SJxhu7QkvQmFuh')
|
||||
|
||||
def test_rbl(self):
|
||||
query = {"module": "rbl", "ip-src": "8.8.8.8"}
|
||||
response = self.misp_modules_post(query)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
Loading…
Reference in New Issue