Update tests

This commit is contained in:
Sean Whalen
2018-03-20 11:39:14 -04:00
parent 182c5870c1
commit fc9222322f
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ install:
# commands to run samples
script:
- "flake8 *.py"
- "flake8 *.py parsedmarc/*.py"
- "cd docs"
- "make html"
- "cd .."
-2
View File
@@ -1385,5 +1385,3 @@ def watch_inbox(host, username, password, callback, reports_folder="INBOX",
server.idle_done()
logger.info("\nIDLE mode done")
server.logout()
+6 -4
View File
@@ -3,16 +3,18 @@
"""A CLI for parsing DMARC reports"""
from argparse import ArgumentParser
from glob import glob
from time import sleep
from collections import OrderedDict
import json
from elasticsearch.exceptions import ElasticsearchException
from parsedmarc import *
from parsedmarc import elastic
__version__ = "3.0.0"
from parsedmarc import logger, IMAPError, get_dmarc_reports_from_inbox, \
parse_report_file, elastic, save_output, watch_inbox, email_results, \
SMTPError, ParserError, __version__
def _main():
+3 -3
View File
@@ -160,8 +160,8 @@ class AlreadySaved(RuntimeError):
def set_hosts(hosts):
"""
Sets the Elasticsearch hosts to use
Sets the Elasticsearch hosts to use
Args:
hosts: A single hostname or URL, or list of hostnames or URLs
"""
@@ -300,7 +300,7 @@ def save_forensic_report_to_elasticsearch(forensic_report):
headers["from"],
headers["subject"],
arrival_date_human
))
))
parsed_sample = forensic_report["parsed_sample"]
sample = ForensicSampleDoc(