diff options
| author | Barry Warsaw | 2017-01-01 22:43:16 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2017-01-01 22:43:16 -0500 |
| commit | 54c9cf97ece230753b6b65597f5009a0c727e830 (patch) | |
| tree | 6bd66871932a208ae54ed82561a1921b970abe09 /src/mailman/rules/tests/test_dmarc.py | |
| parent | e3d6c34b7d02b925cb8c59fa9e1df24741fc46ee (diff) | |
| download | mailman-54c9cf97ece230753b6b65597f5009a0c727e830.tar.gz mailman-54c9cf97ece230753b6b65597f5009a0c727e830.tar.zst mailman-54c9cf97ece230753b6b65597f5009a0c727e830.zip | |
Diffstat (limited to 'src/mailman/rules/tests/test_dmarc.py')
| -rw-r--r-- | src/mailman/rules/tests/test_dmarc.py | 12 |
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: |
