diff options
| author | Barry Warsaw | 2014-12-15 13:06:58 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2014-12-15 13:06:58 -0500 |
| commit | e94434bf2b3e1cfd34028a7bbc804ec8a8ee3788 (patch) | |
| tree | f2ad4f068538b458616ad8b1f0b9f6d46e781478 /src/mailman/runners/tests | |
| parent | d0c53890bf0c8aa531d45958f0e25fdaccbdb133 (diff) | |
| download | mailman-e94434bf2b3e1cfd34028a7bbc804ec8a8ee3788.tar.gz mailman-e94434bf2b3e1cfd34028a7bbc804ec8a8ee3788.tar.zst mailman-e94434bf2b3e1cfd34028a7bbc804ec8a8ee3788.zip | |
Use listid instead of (fqdn) listname in the metadata pickle.
load_external() now always opens in utf-8 mode.
More test repair.
Diffstat (limited to 'src/mailman/runners/tests')
| -rw-r--r-- | src/mailman/runners/tests/test_archiver.py | 16 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_bounce.py | 4 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_confirm.py | 14 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_digest.py | 4 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_incoming.py | 4 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_join.py | 16 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_lmtp.py | 4 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_nntp.py | 18 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_outgoing.py | 46 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_pipeline.py | 4 | ||||
| -rw-r--r-- | src/mailman/runners/tests/test_retry.py | 2 |
11 files changed, 66 insertions, 66 deletions
diff --git a/src/mailman/runners/tests/test_archiver.py b/src/mailman/runners/tests/test_archiver.py index e11b6c805..12bdb0edd 100644 --- a/src/mailman/runners/tests/test_archiver.py +++ b/src/mailman/runners/tests/test_archiver.py @@ -110,7 +110,7 @@ First post! # Ensure that the archive runner ends up archiving the message. self._archiveq.enqueue( self._msg, {}, - listname=self._mlist.fqdn_listname, + listid=self._mlist.list_id, received_time=now()) self._runner.run() # There should now be a copy of the message in the file system. @@ -126,7 +126,7 @@ First post! self._msg['Date'] = now(strip_tzinfo=False).strftime(RFC822_DATE_FMT) self._archiveq.enqueue( self._msg, {}, - listname=self._mlist.fqdn_listname, + listid=self._mlist.list_id, received_time=now()) self._runner.run() # There should now be a copy of the message in the file system. @@ -144,7 +144,7 @@ First post! self._msg['Date'] = now(strip_tzinfo=False).strftime(RFC822_DATE_FMT) self._archiveq.enqueue( self._msg, {}, - listname=self._mlist.fqdn_listname, + listid=self._mlist.list_id, received_time=now()) self._runner.run() # There should now be a copy of the message in the file system. @@ -163,7 +163,7 @@ First post! # again), fast forward a few days. self._archiveq.enqueue( self._msg, {}, - listname=self._mlist.fqdn_listname, + listid=self._mlist.list_id, received_time=now(strip_tzinfo=False)) self._runner.run() # There should now be a copy of the message in the file system. @@ -182,7 +182,7 @@ First post! # again as will happen in the runner), fast forward a few days. self._archiveq.enqueue( self._msg, {}, - listname=self._mlist.fqdn_listname) + listid=self._mlist.list_id) factory.fast_forward(days=4) self._runner.run() # There should now be a copy of the message in the file system. @@ -205,7 +205,7 @@ First post! # again as will happen in the runner), fast forward a few days. self._archiveq.enqueue( self._msg, {}, - listname=self._mlist.fqdn_listname) + listid=self._mlist.list_id) factory.fast_forward(days=4) self._runner.run() # There should now be a copy of the message in the file system. @@ -228,7 +228,7 @@ First post! # again as will happen in the runner), fast forward a few days. self._archiveq.enqueue( self._msg, {}, - listname=self._mlist.fqdn_listname) + listid=self._mlist.list_id) factory.fast_forward(days=4) self._runner.run() # There should now be a copy of the message in the file system. @@ -249,6 +249,6 @@ First post! config.db.store.commit() self._archiveq.enqueue( self._msg, {}, - listname=self._mlist.fqdn_listname) + listid=self._mlist.list_id) self._runner.run() self.assertEqual(os.listdir(config.MESSAGES_DIR), []) diff --git a/src/mailman/runners/tests/test_bounce.py b/src/mailman/runners/tests/test_bounce.py index 315a81c22..b296f4476 100644 --- a/src/mailman/runners/tests/test_bounce.py +++ b/src/mailman/runners/tests/test_bounce.py @@ -69,7 +69,7 @@ To: test-bounces+anne=example.com@example.com Message-Id: <first> """) - self._msgdata = dict(listname='test@example.com') + self._msgdata = dict(listid='test.example.com') self._processor = getUtility(IBounceProcessor) config.push('site owner', """ [mailman] @@ -284,7 +284,7 @@ To: test-bounces+anne=example.com@example.com Message-Id: <first> """) - self._bounceq.enqueue(bounce, dict(listname='test@example.com')) + self._bounceq.enqueue(bounce, dict(listid='test.example.com')) self.assertEqual(len(self._bounceq.files), 1) self._runner.run() self.assertEqual(len(get_queue_messages('bounces')), 0) diff --git a/src/mailman/runners/tests/test_confirm.py b/src/mailman/runners/tests/test_confirm.py index 40fae368f..d387fcfe6 100644 --- a/src/mailman/runners/tests/test_confirm.py +++ b/src/mailman/runners/tests/test_confirm.py @@ -68,7 +68,7 @@ To: test-confirm@example.com """) msg['Subject'] = subject - self._commandq.enqueue(msg, dict(listname='test@example.com')) + self._commandq.enqueue(msg, dict(listid='test.example.com')) self._runner.run() # Anne is now a confirmed member so her user record and email address # should exist in the database. @@ -88,7 +88,7 @@ To: test-confirm@example.com """) msg['Subject'] = subject - self._commandq.enqueue(msg, dict(listname='test@example.com')) + self._commandq.enqueue(msg, dict(listid='test.example.com')) self._runner.run() # Anne is now a confirmed member so her user record and email address # should exist in the database. @@ -144,7 +144,7 @@ Franziskanerstra=C3=9Fe """) msg['Subject'] = subject msg['To'] = to - self._commandq.enqueue(msg, dict(listname='test@example.com')) + self._commandq.enqueue(msg, dict(listid='test.example.com')) self._runner.run() # Anne is now a confirmed member so her user record and email address # should exist in the database. @@ -177,7 +177,7 @@ Franziskanerstra=C3=9Fe """) msg['Subject'] = subject msg['To'] = to - self._commandq.enqueue(msg, dict(listname='test@example.com')) + self._commandq.enqueue(msg, dict(listid='test.example.com')) self._runner.run() # Anne is now a confirmed member so her user record and email address # should exist in the database. @@ -208,7 +208,7 @@ From: Anne Person <anne@example.org> """) msg['Subject'] = subject msg['To'] = to - self._commandq.enqueue(msg, dict(listname='test@example.com', + self._commandq.enqueue(msg, dict(listid='test.example.com', subaddress='confirm')) self._runner.run() # Anne is now a confirmed member so her user record and email address @@ -223,7 +223,7 @@ From: Anne Person <anne@example.org> # one 'Confirmation email' line. confirmation_lines = [] in_results = False - for line in body_line_iterator(messages[0].msg, decode=True): + for line in body_line_iterator(messages[0].msg): line = line.strip() if in_results: if line.startswith('- Done'): @@ -253,7 +253,7 @@ From: Anne Person <anne@example.org> """) msg['Subject'] = subject msg['To'] = to - self._commandq.enqueue(msg, dict(listname='test@example.com', + self._commandq.enqueue(msg, dict(listid='test.example.com', subaddress='confirm')) self._runner.run() # Now there's a email command notification and a welcome message. All diff --git a/src/mailman/runners/tests/test_digest.py b/src/mailman/runners/tests/test_digest.py index 80cf253bc..6cd3c9a01 100644 --- a/src/mailman/runners/tests/test_digest.py +++ b/src/mailman/runners/tests/test_digest.py @@ -65,7 +65,7 @@ message triggering a digest self._process(self._mlist, msg, {}) self._digestq.enqueue( msg, - listname=self._mlist.fqdn_listname, + listid=self._mlist.list_id, digest_path=mbox_path, volume=1, digest_number=1) self._runner.run() @@ -92,7 +92,7 @@ message triggering a digest mbox.add(msg.as_string()) self._digestq.enqueue( msg, - listname=self._mlist.fqdn_listname, + listid=self._mlist.list_id, digest_path=mbox_path, volume=1, digest_number=1) # Use any error logs as the error message if the test fails. diff --git a/src/mailman/runners/tests/test_incoming.py b/src/mailman/runners/tests/test_incoming.py index 9830fedb9..2d49ae550 100644 --- a/src/mailman/runners/tests/test_incoming.py +++ b/src/mailman/runners/tests/test_incoming.py @@ -76,7 +76,7 @@ To: test@example.com def test_posting(self): # A message posted to the list goes through the posting chain. - msgdata = dict(listname='test@example.com') + msgdata = dict(listid='test.example.com') config.switchboards['in'].enqueue(self._msg, msgdata) self._in.run() messages = get_queue_messages('out') @@ -85,7 +85,7 @@ To: test@example.com def test_owner(self): # A message posted to the list goes through the posting chain. - msgdata = dict(listname='test@example.com', + msgdata = dict(listid='test.example.com', to_owner=True) config.switchboards['in'].enqueue(self._msg, msgdata) self._in.run() diff --git a/src/mailman/runners/tests/test_join.py b/src/mailman/runners/tests/test_join.py index fbea9e661..2aa361254 100644 --- a/src/mailman/runners/tests/test_join.py +++ b/src/mailman/runners/tests/test_join.py @@ -72,7 +72,7 @@ subscribe # Adding the subaddress to the metadata dictionary mimics what happens # when the above email message is first processed by the lmtp runner. # For convenience, we skip that step in this test. - self._commandq.enqueue(msg, dict(listname='test@example.com', + self._commandq.enqueue(msg, dict(listid='test.example.com', subaddress='join')) self._runner.run() # There will be two messages in the queue. The first one is a reply @@ -87,7 +87,7 @@ subscribe # one 'Confirmation email' line. confirmation_lines = [] in_results = False - for line in body_line_iterator(messages[0].msg, decode=True): + for line in body_line_iterator(messages[0].msg): line = line.strip() if in_results: if line.startswith('- Done'): @@ -112,7 +112,7 @@ To: test-join@example.com Subject: join """) - self._commandq.enqueue(msg, dict(listname='test@example.com')) + self._commandq.enqueue(msg, dict(listid='test.example.com')) self._runner.run() # There will be one message in the queue - a reply to Anne notifying # her of the status of her command email. Because Anne is already @@ -125,7 +125,7 @@ Subject: join # one 'Confirmation email' line. confirmation_lines = [] in_results = False - for line in body_line_iterator(messages[0].msg, decode=True): + for line in body_line_iterator(messages[0].msg): line = line.strip() if in_results: if line.startswith('- Done'): @@ -181,7 +181,7 @@ To: test-request@example.com join """) - self._commandq.enqueue(msg, dict(listname='test@example.com')) + self._commandq.enqueue(msg, dict(listid='test.example.com')) self._runner.run() anne = self._confirm() self.assertEqual(anne.address.email, 'anne@example.org') @@ -195,7 +195,7 @@ To: test-request@example.com join digest=no """) - self._commandq.enqueue(msg, dict(listname='test@example.com')) + self._commandq.enqueue(msg, dict(listid='test.example.com')) self._runner.run() anne = self._confirm() self.assertEqual(anne.address.email, 'anne@example.org') @@ -209,7 +209,7 @@ To: test-request@example.com join digest=mime """) - self._commandq.enqueue(msg, dict(listname='test@example.com')) + self._commandq.enqueue(msg, dict(listid='test.example.com')) self._runner.run() anne = self._confirm() self.assertEqual(anne.address.email, 'anne@example.org') @@ -223,7 +223,7 @@ To: test-request@example.com join digest=plain """) - self._commandq.enqueue(msg, dict(listname='test@example.com')) + self._commandq.enqueue(msg, dict(listid='test.example.com')) self._runner.run() anne = self._confirm() self.assertEqual(anne.address.email, 'anne@example.org') diff --git a/src/mailman/runners/tests/test_lmtp.py b/src/mailman/runners/tests/test_lmtp.py index 26308548c..ccd27c829 100644 --- a/src/mailman/runners/tests/test_lmtp.py +++ b/src/mailman/runners/tests/test_lmtp.py @@ -142,5 +142,5 @@ Message-ID: <alpha> """) messages = get_queue_messages('in') self.assertEqual(len(messages), 1) - self.assertEqual(messages[0].msgdata['listname'], - 'my-list@example.com') + self.assertEqual(messages[0].msgdata['listid'], + 'my-list.example.com') diff --git a/src/mailman/runners/tests/test_nntp.py b/src/mailman/runners/tests/test_nntp.py index 191dd2657..24db00285 100644 --- a/src/mailman/runners/tests/test_nntp.py +++ b/src/mailman/runners/tests/test_nntp.py @@ -257,7 +257,7 @@ Testing @mock.patch('nntplib.NNTP') def test_connect(self, class_mock): # Test connection to the NNTP server with default values. - self._nntpq.enqueue(self._msg, {}, listname='test@example.com') + self._nntpq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() class_mock.assert_called_once_with( '', 119, user='', password='', readermode=True) @@ -267,7 +267,7 @@ Testing @mock.patch('nntplib.NNTP') def test_connect_with_configuration(self, class_mock): # Test connection to the NNTP server with specific values. - self._nntpq.enqueue(self._msg, {}, listname='test@example.com') + self._nntpq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() class_mock.assert_called_once_with( 'nntp.example.com', 2112, @@ -276,7 +276,7 @@ Testing @mock.patch('nntplib.NNTP') def test_post(self, class_mock): # Test that the message is posted to the NNTP server. - self._nntpq.enqueue(self._msg, {}, listname='test@example.com') + self._nntpq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() # Get the mocked instance, which was used in the runner. conn_mock = class_mock() @@ -295,7 +295,7 @@ Testing def test_connection_got_quit(self, class_mock): # The NNTP connection gets closed after a successful post. # Test that the message is posted to the NNTP server. - self._nntpq.enqueue(self._msg, {}, listname='test@example.com') + self._nntpq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() # Get the mocked instance, which was used in the runner. conn_mock = class_mock() @@ -306,7 +306,7 @@ Testing @mock.patch('nntplib.NNTP', side_effect=nntplib.NNTPTemporaryError) def test_connect_with_nntplib_failure(self, class_mock): - self._nntpq.enqueue(self._msg, {}, listname='test@example.com') + self._nntpq.enqueue(self._msg, {}, listid='test.example.com') mark = LogFileMark('mailman.error') self._runner.run() log_message = mark.readline()[:-1] @@ -315,7 +315,7 @@ Testing @mock.patch('nntplib.NNTP', side_effect=socket.error) def test_connect_with_socket_failure(self, class_mock): - self._nntpq.enqueue(self._msg, {}, listname='test@example.com') + self._nntpq.enqueue(self._msg, {}, listid='test.example.com') mark = LogFileMark('mailman.error') self._runner.run() log_message = mark.readline()[:-1] @@ -330,7 +330,7 @@ Testing # I.e. stop immediately, since the queue will not be empty. return True runner = make_testable_runner(nntp.NNTPRunner, 'nntp', predicate=once) - self._nntpq.enqueue(self._msg, {}, listname='test@example.com') + self._nntpq.enqueue(self._msg, {}, listid='test.example.com') mark = LogFileMark('mailman.error') runner.run() log_message = mark.readline()[:-1] @@ -345,7 +345,7 @@ Testing def test_connection_never_gets_quit_after_failures(self, class_mock): # The NNTP connection doesn't get closed after a unsuccessful # connection, since there's nothing to close. - self._nntpq.enqueue(self._msg, {}, listname='test@example.com') + self._nntpq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() # Get the mocked instance, which was used in the runner. Turn off the # exception raising side effect first though! @@ -362,7 +362,7 @@ Testing # Add a side-effect to the instance mock's .post() method. conn_mock = class_mock() conn_mock.post.side_effect = nntplib.NNTPTemporaryError - self._nntpq.enqueue(self._msg, {}, listname='test@example.com') + self._nntpq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() # The connection object's post() method was called once with a # file-like object containing the message's bytes. Read those bytes diff --git a/src/mailman/runners/tests/test_outgoing.py b/src/mailman/runners/tests/test_outgoing.py index 62f6776b1..68fb75fc3 100644 --- a/src/mailman/runners/tests/test_outgoing.py +++ b/src/mailman/runners/tests/test_outgoing.py @@ -96,7 +96,7 @@ Message-Id: <first> deliver_after = now() + timedelta(days=10) self._msgdata['deliver_after'] = deliver_after self._outq.enqueue(self._msg, self._msgdata, - tolist=True, listname='test@example.com') + tolist=True, listid='test.example.com') self._runner.run() items = get_queue_messages('out') self.assertEqual(len(items), 1) @@ -149,20 +149,20 @@ Message-Id: <first> def test_delivery_callback(self): # Test that the configuration variable calls the appropriate callback. - self._outq.enqueue(self._msg, {}, listname='test@example.com') + self._outq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() self.assertEqual(captured_mlist, self._mlist) self.assertEqual(captured_msg.as_string(), self._msg.as_string()) # Of course, the message metadata will contain a bunch of keys added # by the processing. We don't really care about the details, so this # test is a good enough stand-in. - self.assertEqual(captured_msgdata['listname'], 'test@example.com') + self.assertEqual(captured_msgdata['listid'], 'test.example.com') def test_verp_in_metadata(self): # Test that if the metadata has a 'verp' key, it is unchanged. marker = 'yepper' msgdata = dict(verp=marker) - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') self._runner.run() self.assertEqual(captured_msgdata['verp'], marker) @@ -171,7 +171,7 @@ Message-Id: <first> # indicates, messages will be VERP'd. msgdata = {} self._mlist.personalize = Personalization.individual - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') with temporary_config('personalize', """ [mta] verp_personalized_deliveries: yes @@ -184,7 +184,7 @@ Message-Id: <first> # indicates, messages will be VERP'd. msgdata = {} self._mlist.personalize = Personalization.full - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') with temporary_config('personalize', """ [mta] verp_personalized_deliveries: yes @@ -197,14 +197,14 @@ Message-Id: <first> # does not indicate, messages will not be VERP'd. msgdata = {} self._mlist.personalize = Personalization.full - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') self._runner.run() self.assertFalse('verp' in captured_msgdata) def test_verp_never(self): # Never VERP when the interval is zero. msgdata = {} - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') with temporary_config('personalize', """ [mta] verp_delivery_interval: 0 @@ -215,7 +215,7 @@ Message-Id: <first> def test_verp_always(self): # Always VERP when the interval is one. msgdata = {} - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') with temporary_config('personalize', """ [mta] verp_delivery_interval: 1 @@ -227,7 +227,7 @@ Message-Id: <first> # VERP every so often, when the post_id matches. self._mlist.post_id = 5 msgdata = {} - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') with temporary_config('personalize', """ [mta] verp_delivery_interval: 5 @@ -239,7 +239,7 @@ Message-Id: <first> # VERP every so often, when the post_id matches. self._mlist.post_id = 4 msgdata = {} - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') with temporary_config('personalize', """ [mta] verp_delivery_interval: 5 @@ -287,7 +287,7 @@ Message-Id: <first> error_log = logging.getLogger('mailman.error') filename = error_log.handlers[0].filename filepos = os.stat(filename).st_size - self._outq.enqueue(self._msg, {}, listname='test@example.com') + self._outq.enqueue(self._msg, {}, listid='test.example.com') with temporary_config('port 0', """ [mta] smtp_port: 0 @@ -308,7 +308,7 @@ Message-Id: <first> # that is a log message. Start by opening the error log and reading # the current file position. mark = LogFileMark('mailman.error') - self._outq.enqueue(self._msg, {}, listname='test@example.com') + self._outq.enqueue(self._msg, {}, listid='test.example.com') with temporary_config('port 0', """ [mta] smtp_port: 2112 @@ -369,7 +369,7 @@ Message-Id: <first> token = send_probe(member, self._msg) msgdata = dict(probe_token=token) permanent_failures.append('anne@example.com') - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') self._runner.run() events = list(self._processor.unprocessed) self.assertEqual(len(events), 1) @@ -390,7 +390,7 @@ Message-Id: <first> getUtility(IPendings).confirm(token) msgdata = dict(probe_token=token) permanent_failures.append('anne@example.com') - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') self._runner.run() events = list(self._processor.unprocessed) self.assertEqual(len(events), 0) @@ -404,7 +404,7 @@ Message-Id: <first> getUtility(IPendings).confirm(token) msgdata = dict(probe_token=token) temporary_failures.append('anne@example.com') - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') self._runner.run() events = list(self._processor.unprocessed) self.assertEqual(len(events), 0) @@ -412,7 +412,7 @@ Message-Id: <first> def test_one_permanent_failure(self): # Normal (i.e. non-probe) permanent failures just get registered. permanent_failures.append('anne@example.com') - self._outq.enqueue(self._msg, {}, listname='test@example.com') + self._outq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() events = list(self._processor.unprocessed) self.assertEqual(len(events), 1) @@ -423,7 +423,7 @@ Message-Id: <first> # Two normal (i.e. non-probe) permanent failures just get registered. permanent_failures.append('anne@example.com') permanent_failures.append('bart@example.com') - self._outq.enqueue(self._msg, {}, listname='test@example.com') + self._outq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() events = list(self._processor.unprocessed) self.assertEqual(len(events), 2) @@ -437,7 +437,7 @@ Message-Id: <first> # put in the retry queue, but with some metadata to prevent infinite # retries. temporary_failures.append('cris@example.com') - self._outq.enqueue(self._msg, {}, listname='test@example.com') + self._outq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() events = list(self._processor.unprocessed) self.assertEqual(len(events), 0) @@ -458,7 +458,7 @@ Message-Id: <first> # retries. temporary_failures.append('cris@example.com') temporary_failures.append('dave@example.com') - self._outq.enqueue(self._msg, {}, listname='test@example.com') + self._outq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() events = list(self._processor.unprocessed) self.assertEqual(len(events), 0) @@ -476,7 +476,7 @@ Message-Id: <first> permanent_failures.append('fred@example.com') temporary_failures.append('gwen@example.com') temporary_failures.append('herb@example.com') - self._outq.enqueue(self._msg, {}, listname='test@example.com') + self._outq.enqueue(self._msg, {}, listid='test.example.com') self._runner.run() # Let's look at the permanent failures. events = list(self._processor.unprocessed) @@ -503,7 +503,7 @@ Message-Id: <first> as_timedelta(config.mta.delivery_retry_period)) msgdata = dict(last_recip_count=2, deliver_until=deliver_until) - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') self._runner.run() # The retry queue should have our message waiting to be retried. items = get_queue_messages('retry') @@ -522,7 +522,7 @@ Message-Id: <first> deliver_until = datetime(2005, 8, 1, 7, 49, 23) + retry_period msgdata = dict(last_recip_count=2, deliver_until=deliver_until) - self._outq.enqueue(self._msg, msgdata, listname='test@example.com') + self._outq.enqueue(self._msg, msgdata, listid='test.example.com') # Before the runner runs, several days pass. factory.fast_forward(retry_period.days + 1) mark = LogFileMark('mailman.smtp') diff --git a/src/mailman/runners/tests/test_pipeline.py b/src/mailman/runners/tests/test_pipeline.py index 50ec6cb9a..1eba5cfbf 100644 --- a/src/mailman/runners/tests/test_pipeline.py +++ b/src/mailman/runners/tests/test_pipeline.py @@ -101,7 +101,7 @@ To: test@example.com def test_posting(self): # A message accepted for posting gets processed through the posting # pipeline. - msgdata = dict(listname='test@example.com') + msgdata = dict(listid='test.example.com') config.switchboards['pipeline'].enqueue(self._msg, msgdata) self._pipeline.run() self.assertEqual(len(self._markers), 1) @@ -110,7 +110,7 @@ To: test@example.com def test_owner(self): # A message accepted for posting to a list's owners gets processed # through the owner pipeline. - msgdata = dict(listname='test@example.com', + msgdata = dict(listid='test.example.com', to_owner=True) config.switchboards['pipeline'].enqueue(self._msg, msgdata) self._pipeline.run() diff --git a/src/mailman/runners/tests/test_retry.py b/src/mailman/runners/tests/test_retry.py index 28289bc05..15775e5d8 100644 --- a/src/mailman/runners/tests/test_retry.py +++ b/src/mailman/runners/tests/test_retry.py @@ -54,7 +54,7 @@ To: test@example.com Message-Id: <first> """) - self._msgdata = dict(listname='test@example.com') + self._msgdata = dict(listid='test.example.com') def test_message_put_in_outgoing_queue(self): self._retryq.enqueue(self._msg, self._msgdata) |
