summaryrefslogtreecommitdiff
path: root/src/mailman/runners/tests/test_join.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/runners/tests/test_join.py')
-rw-r--r--src/mailman/runners/tests/test_join.py22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/mailman/runners/tests/test_join.py b/src/mailman/runners/tests/test_join.py
index fbea9e661..df24bc06b 100644
--- a/src/mailman/runners/tests/test_join.py
+++ b/src/mailman/runners/tests/test_join.py
@@ -17,9 +17,6 @@
"""Test mailing list joins."""
-from __future__ import absolute_import, print_function, unicode_literals
-
-__metaclass__ = type
__all__ = [
'TestJoin',
'TestJoinWithDigests',
@@ -29,8 +26,6 @@ __all__ = [
import unittest
from email.iterators import body_line_iterator
-from zope.component import getUtility
-
from mailman.app.lifecycle import create_list
from mailman.config import config
from mailman.interfaces.member import DeliveryMode
@@ -42,6 +37,7 @@ from mailman.testing.helpers import (
get_queue_messages, make_testable_runner, reset_the_world,
specialized_message_from_string as mfs)
from mailman.testing.layers import ConfigLayer
+from zope.component import getUtility
@@ -72,7 +68,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 +83,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 +108,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 +121,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 +177,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 +191,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 +205,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 +219,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')