1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
diff --git a/tests.py b/tests.py
index 5d32b1e..69d20a5 100644
--- a/tests.py
+++ b/tests.py
@@ -110,7 +110,7 @@ class Test(unittest.TestCase):
continue
print("Testing {0}: ".format(sample_path), end="")
parsed_report = parsedmarc.parse_report_file(
- sample_path, always_use_local_files=True
+ sample_path, always_use_local_files=True, offline=True
)["report"]
parsedmarc.parsed_aggregate_reports_to_csv(parsed_report)
print("Passed!")
@@ -118,7 +118,7 @@ class Test(unittest.TestCase):
def testEmptySample(self):
"""Test empty/unparasable report"""
with self.assertRaises(parsedmarc.ParserError):
- parsedmarc.parse_report_file("samples/empty.xml")
+ parsedmarc.parse_report_file("samples/empty.xml", offline=True)
def testForensicSamples(self):
"""Test sample forensic/ruf/failure DMARC reports"""
@@ -129,7 +129,7 @@ class Test(unittest.TestCase):
with open(sample_path) as sample_file:
sample_content = sample_file.read()
parsed_report = parsedmarc.parse_report_email(sample_content)["report"]
- parsed_report = parsedmarc.parse_report_file(sample_path)["report"]
+ parsed_report = parsedmarc.parse_report_file(sample_path, offline=True)["report"]
parsedmarc.parsed_forensic_reports_to_csv(parsed_report)
print("Passed!")
@@ -141,7 +141,7 @@ class Test(unittest.TestCase):
if os.path.isdir(sample_path):
continue
print("Testing {0}: ".format(sample_path), end="")
- parsed_report = parsedmarc.parse_report_file(sample_path)["report"]
+ parsed_report = parsedmarc.parse_report_file(sample_path, offline=True)["report"]
parsedmarc.parsed_smtp_tls_reports_to_csv(parsed_report)
print("Passed!")
|