mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-10-22 10:48:16 +00:00
[SMTP TLS] some minor bug fixes (#477)
* fix minor bugs during smtp-tls parsing, add docker-compose for local elasticsearch, add smtp-tls tests * fix wrong log message parameter * fix wrong log message * add contact-info to smtp tls report, fix wrong fieldnames * fix wrong fieldnames * fix wrong index name for search * at least for some reporting organizations the field sending-mta-ip is optional... * add missing fields to elasticsearch for smtp tls * failure_details is a list, add more test cases * fix wrong name in ci.ini
This commit is contained in:
1 parent
995bdbcd97
commit
f3206dcdab
7 files changed
+177
-36
No files matched your search
@@ -59,6 +59,19 @@ class Test(unittest.TestCase):
|
||||
parsedmarc.parsed_forensic_reports_to_csv(parsed_report)
|
||||
print("Passed!")
|
||||
|
||||
def testSmtpTlsSamples(self):
|
||||
"""Test sample SMTP TLS reports"""
|
||||
print()
|
||||
sample_paths = glob("samples/smtp_tls/*")
|
||||
for sample_path in sample_paths:
|
||||
if os.path.isdir(sample_path):
|
||||
continue
|
||||
print("Testing {0}: " .format(sample_path), end="")
|
||||
parsed_report = parsedmarc.parse_report_file(
|
||||
sample_path)["report"]
|
||||
parsedmarc.parsed_smtp_tls_reports_to_csv(parsed_report)
|
||||
print("Passed!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main(verbosity=2)
|
||||
Reference in new issue
Block a user