summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mailman/app/tests/test_inject.py8
-rw-r--r--src/mailman/chains/headers.py2
-rw-r--r--src/mailman/commands/docs/unshunt.rst2
-rw-r--r--src/mailman/core/docs/runner.rst4
-rw-r--r--src/mailman/core/tests/test_runner.py2
-rw-r--r--src/mailman/handlers/docs/filtering.rst4
6 files changed, 11 insertions, 11 deletions
diff --git a/src/mailman/app/tests/test_inject.py b/src/mailman/app/tests/test_inject.py
index 3bfafadf8..23abc6943 100644
--- a/src/mailman/app/tests/test_inject.py
+++ b/src/mailman/app/tests/test_inject.py
@@ -64,7 +64,7 @@ Nothing.
self.assertEqual(len(items), 1)
self.assertMultiLineEqual(items[0].msg.as_string(),
self.msg.as_string())
- self.assertEqual(items[0].msgdata['listname'], 'test@example.com')
+ self.assertEqual(items[0].msgdata['listid'], 'test.example.com')
self.assertEqual(items[0].msgdata['original_size'],
len(self.msg.as_string()))
@@ -84,7 +84,7 @@ Nothing.
self.assertEqual(len(items), 1)
self.assertMultiLineEqual(items[0].msg.as_string(),
self.msg.as_string())
- self.assertEqual(items[0].msgdata['listname'], 'test@example.com')
+ self.assertEqual(items[0].msgdata['listid'], 'test.example.com')
self.assertEqual(items[0].msgdata['original_size'],
len(self.msg.as_string()))
@@ -171,7 +171,7 @@ Nothing.
# Delete that header because it is not in the original text.
del items[0].msg['x-message-id-hash']
self.assertMultiLineEqual(items[0].msg.as_string(), self.text)
- self.assertEqual(items[0].msgdata['listname'], 'test@example.com')
+ self.assertEqual(items[0].msgdata['listid'], 'test.example.com')
self.assertEqual(items[0].msgdata['original_size'],
# Add back the X-Message-ID-Header which was in the
# message contributing to the original_size, but
@@ -196,7 +196,7 @@ Nothing.
# Remove the X-Message-ID-Hash header which isn't in the original text.
del items[0].msg['x-message-id-hash']
self.assertMultiLineEqual(items[0].msg.as_string(), self.text)
- self.assertEqual(items[0].msgdata['listname'], 'test@example.com')
+ self.assertEqual(items[0].msgdata['listid'], 'test.example.com')
self.assertEqual(items[0].msgdata['original_size'],
# Add back the X-Message-ID-Header which was in the
# message contributing to the original_size, but
diff --git a/src/mailman/chains/headers.py b/src/mailman/chains/headers.py
index 7628c8b7c..b37079f7f 100644
--- a/src/mailman/chains/headers.py
+++ b/src/mailman/chains/headers.py
@@ -122,7 +122,7 @@ class HeaderMatchChain(Chain):
"""See `IMutableChain`."""
# Remove all dynamically created rules. Use the keys so we can mutate
# the dictionary inside the loop.
- for rule_name in config.rules.keys():
+ for rule_name in list(config.rules):
if rule_name.startswith('header-match-'):
del config.rules[rule_name]
self._extended_links = []
diff --git a/src/mailman/commands/docs/unshunt.rst b/src/mailman/commands/docs/unshunt.rst
index 93d89f001..9532ae029 100644
--- a/src/mailman/commands/docs/unshunt.rst
+++ b/src/mailman/commands/docs/unshunt.rst
@@ -83,7 +83,7 @@ queue.
2
>>> sorted(item.msg['message-id'] for item in items)
- [u'<badgers>', u'<crow>']
+ ['<badgers>', '<crow>']
Return to the original queue
diff --git a/src/mailman/core/docs/runner.rst b/src/mailman/core/docs/runner.rst
index 865635310..11a771fe8 100644
--- a/src/mailman/core/docs/runner.rst
+++ b/src/mailman/core/docs/runner.rst
@@ -55,7 +55,7 @@ on instance variables.
... A test message.
... """)
>>> switchboard = config.switchboards['test']
- >>> filebase = switchboard.enqueue(msg, list_id=mlist.list_id,
+ >>> filebase = switchboard.enqueue(msg, listid=mlist.list_id,
... foo='yes', bar='no')
>>> runner.run()
>>> print(runner.msg.as_string())
@@ -69,7 +69,7 @@ on instance variables.
bar : no
foo : yes
lang : en
- listname : test@example.com
+ listid : test.example.com
version : 3
XXX More of the Runner API should be tested.
diff --git a/src/mailman/core/tests/test_runner.py b/src/mailman/core/tests/test_runner.py
index a48925b4c..66111234e 100644
--- a/src/mailman/core/tests/test_runner.py
+++ b/src/mailman/core/tests/test_runner.py
@@ -79,7 +79,7 @@ Message-ID: <ant>
self.assertTrue(isinstance(event, RunnerCrashEvent))
self.assertEqual(event.mailing_list, self._mlist)
self.assertEqual(event.message['message-id'], '<ant>')
- self.assertEqual(event.metadata['listname'], 'test@example.com')
+ self.assertEqual(event.metadata['listid'], 'test.example.com')
self.assertTrue(isinstance(event.error, RuntimeError))
self.assertEqual(str(event.error), 'borked')
self.assertTrue(isinstance(event.runner, CrashingRunner))
diff --git a/src/mailman/handlers/docs/filtering.rst b/src/mailman/handlers/docs/filtering.rst
index 6673933ad..582211d54 100644
--- a/src/mailman/handlers/docs/filtering.rst
+++ b/src/mailman/handlers/docs/filtering.rst
@@ -235,8 +235,8 @@ name of the file containing the message payload to filter.
>>> try:
... print("""\
... import sys
- ... print 'Converted text/html to text/plain'
- ... print 'Filename:', sys.argv[1]
+ ... print('Converted text/html to text/plain')
+ ... print('Filename:', sys.argv[1])
... """, file=fp)
... finally:
... fp.close()