summaryrefslogtreecommitdiff
path: root/src/mailman/rules/tests/test_dmarc.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rules/tests/test_dmarc.py')
-rw-r--r--src/mailman/rules/tests/test_dmarc.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mailman/rules/tests/test_dmarc.py b/src/mailman/rules/tests/test_dmarc.py
index df5127895..7748343eb 100644
--- a/src/mailman/rules/tests/test_dmarc.py
+++ b/src/mailman/rules/tests/test_dmarc.py
@@ -173,6 +173,18 @@ To: ant@example.com
'anne@example.info (_dmarc.example.info). '
'Abstract base class shared by all dnspython exceptions.\n')
+ def test_parser(self):
+ data_file = resource_filename(
+ 'mailman.rules.tests.data', 'org_domain.txt')
+ dmarc.parse_suffix_list(data_file)
+ # There is no entry for example.biz because that line starts with
+ # whitespace.
+ self.assertNotIn('biz.example', self.cache)
+ # The file had !city.kobe.jp so the flag says there's an exception.
+ self.assertTrue(self.cache['jp.kobe.city'])
+ # The file had *.kobe.jp so there's no exception.
+ self.assertFalse(self.cache['jp.kobe.*'])
+
# New in Python 3.5.
try: