forked from pool/python-checkdmarc
- update to 5.5.0:
* Support `redirect` in SPF OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-checkdmarc?expand=0&rev=7
This commit is contained in:
58
skip-network-tests.patch
Normal file
58
skip-network-tests.patch
Normal file
@@ -0,0 +1,58 @@
|
||||
--- tests.py~ 2024-02-29 12:22:56.007309853 +1100
|
||||
+++ tests.py 2024-02-29 12:25:49.618057933 +1100
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
"""Automated tests"""
|
||||
|
||||
+import os.path
|
||||
import unittest
|
||||
from collections import OrderedDict
|
||||
|
||||
@@ -94,6 +95,7 @@
|
||||
|
||||
self.assertEqual(len(results["warnings"]), 0)
|
||||
|
||||
+ @unittest.skipUnless(os.path.exists("/etc/resolv.conf"), "no network")
|
||||
def testSplitSPFRecord(self):
|
||||
"""Split SPF records are parsed properly"""
|
||||
|
||||
@@ -129,6 +131,7 @@
|
||||
self.assertRaises(checkdmarc.spf.SPFRecordNotFound,
|
||||
checkdmarc.spf.parse_spf_record, spf_record, domain)
|
||||
|
||||
+ @unittest.skipUnless(os.path.exists("/etc/resolv.conf"), "no network")
|
||||
def testTooManySPFDNSLookups(self):
|
||||
"""SPF records with > 10 SPF mechanisms that cause DNS lookups raise
|
||||
SPFTooManyDNSLookups"""
|
||||
@@ -144,6 +147,7 @@
|
||||
self.assertRaises(checkdmarc.spf.SPFTooManyDNSLookups,
|
||||
checkdmarc.spf.parse_spf_record, spf_record, domain)
|
||||
|
||||
+ @unittest.skipUnless(os.path.exists("/etc/resolv.conf"), "no network")
|
||||
def testTooManySPFVoidDNSLookups(self):
|
||||
"""SPF records with > 2 void DNS lookups"""
|
||||
|
||||
@@ -216,6 +220,7 @@
|
||||
self.assertRaises(checkdmarc.spf.SPFIncludeLoop,
|
||||
checkdmarc.spf.parse_spf_record, spf_record, domain)
|
||||
|
||||
+ @unittest.skipUnless(os.path.exists("/etc/resolv.conf"), "no network")
|
||||
def testSPFMissingMXRecord(self):
|
||||
"""A warning is issued if an SPF record contains a mx mechanism
|
||||
pointing to a domain that has no MX records"""
|
||||
@@ -226,6 +231,7 @@
|
||||
self.assertIn("{0} does not have any MX records".format(domain),
|
||||
results["warnings"])
|
||||
|
||||
+ @unittest.skipUnless(os.path.exists("/etc/resolv.conf"), "no network")
|
||||
def testSPFMissingARecord(self):
|
||||
"""A warning is issued if an SPF record contains a mx mechanism
|
||||
pointing to a domain that has no A records"""
|
||||
@@ -236,6 +242,7 @@
|
||||
self.assertIn("cardinalhealth.net does not have any A/AAAA records",
|
||||
results["warnings"])
|
||||
|
||||
+ @unittest.skipUnless(os.path.exists("/etc/resolv.conf"), "no network")
|
||||
def testDMARCPctLessThan100Warning(self):
|
||||
"""A warning is issued if the DMARC pvt value is less than 100"""
|
||||
|
||||
Reference in New Issue
Block a user