diff --git a/examples/create_events.py b/examples/create_events.py index 17672eb..f780511 100755 --- a/examples/create_events.py +++ b/examples/create_events.py @@ -13,7 +13,7 @@ except NameError: def init(url, key): - return PyMISP(url, key, True, 'json') + return PyMISP(url, key, True, 'json', debug=True) if __name__ == '__main__': parser = argparse.ArgumentParser(description='Create an event on MISP.') @@ -26,7 +26,4 @@ if __name__ == '__main__': misp = init(misp_url, misp_key) event = misp.new_event(args.distrib, args.threat, args.analysis, args.info) - print event - - response = misp.add_mutex(event, 'booh') - print response + print(event) diff --git a/tests/new_misp_event.json b/tests/new_misp_event.json new file mode 100644 index 0000000..88ac8f9 --- /dev/null +++ b/tests/new_misp_event.json @@ -0,0 +1,34 @@ +{ + "Event": { + "uuid": "57c06bb1-625c-4d34-9b9f-4066950d210f", + "orgc_id": "1", + "publish_timestamp": "0", + "RelatedEvent": [], + "org_id": "1", + "Org": { + "uuid": "55f6ea5e-2c60-40e5-964f-47a8950d210f", + "name": "CIRCL", + "id": "1" + }, + "attribute_count": null, + "distribution": "0", + "sharing_group_id": "0", + "threat_level_id": "1", + "locked": false, + "Attribute": [], + "published": false, + "ShadowAttribute": [], + "date": "2016-08-26", + "info": "This is a test", + "timestamp": "1472228273", + "Orgc": { + "uuid": "55f6ea5e-2c60-40e5-964f-47a8950d210f", + "name": "CIRCL", + "id": "1" + }, + "id": "594", + "proposal_email_lock": false, + "analysis": "0" + } +} +