diff options
| author | Aurélien Bompard | 2016-02-02 11:49:00 +0100 |
|---|---|---|
| committer | Barry Warsaw | 2016-02-29 21:52:13 -0500 |
| commit | 15238cb5683eb9a0eab9dcd251f509a693a22451 (patch) | |
| tree | b57d661d1a6f2b1ff4b8c6920d898c36aa016164 /src/mailman/chains/tests/test_headers.py | |
| parent | 14dbe7fb4a6b29ce955fa1c8d4c1859c514e8e13 (diff) | |
| download | mailman-15238cb5683eb9a0eab9dcd251f509a693a22451.tar.gz mailman-15238cb5683eb9a0eab9dcd251f509a693a22451.tar.zst mailman-15238cb5683eb9a0eab9dcd251f509a693a22451.zip | |
Diffstat (limited to 'src/mailman/chains/tests/test_headers.py')
| -rw-r--r-- | src/mailman/chains/tests/test_headers.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mailman/chains/tests/test_headers.py b/src/mailman/chains/tests/test_headers.py index ff42feb95..d42baa55e 100644 --- a/src/mailman/chains/tests/test_headers.py +++ b/src/mailman/chains/tests/test_headers.py @@ -30,7 +30,7 @@ from mailman.config import config from mailman.core.chains import process from mailman.email.message import Message from mailman.interfaces.chain import LinkAction, HoldEvent -from mailman.interfaces.mailinglist import IHeaderMatchSet +from mailman.interfaces.mailinglist import IHeaderMatchList from mailman.testing.helpers import ( LogFileMark, configuration, event_subscribers, specialized_message_from_string as mfs) @@ -146,8 +146,8 @@ class TestHeaderChain(unittest.TestCase): # Test that the header-match chain has the header checks from the # mailing-list configuration. chain = config.chains['header-match'] - header_matches = IHeaderMatchSet(self._mlist) - header_matches.add('Foo', 'a+') + header_matches = IHeaderMatchList(self._mlist) + header_matches.append('Foo', 'a+') links = [link for link in chain.get_links(self._mlist, Message(), {}) if link.rule.name != 'any'] self.assertEqual(len(links), 1) @@ -159,10 +159,10 @@ class TestHeaderChain(unittest.TestCase): # Test that the mailing-list header-match complex rules are read # properly. chain = config.chains['header-match'] - header_matches = IHeaderMatchSet(self._mlist) - header_matches.add('Foo', 'a+', 'reject') - header_matches.add('Bar', 'b+', 'discard') - header_matches.add('Baz', 'z+', 'accept') + header_matches = IHeaderMatchList(self._mlist) + header_matches.append('Foo', 'a+', 'reject') + header_matches.append('Bar', 'b+', 'discard') + header_matches.append('Baz', 'z+', 'accept') links = [link for link in chain.get_links(self._mlist, Message(), {}) if link.rule.name != 'any'] self.assertEqual(len(links), 3) @@ -192,8 +192,8 @@ MIME-Version: 1.0 A message body. """) msgdata = {} - header_matches = IHeaderMatchSet(self._mlist) - header_matches.add('Foo', 'foo', 'accept') + header_matches = IHeaderMatchList(self._mlist) + header_matches.append('Foo', 'foo', 'accept') # This event subscriber records the event that occurs when the message # is processed by the owner chain. events = [] |
