summaryrefslogtreecommitdiff
path: root/src/mailman/runners/tests
diff options
context:
space:
mode:
authorBarry Warsaw2013-03-06 16:59:15 -0500
committerBarry Warsaw2013-03-06 16:59:15 -0500
commit755b0d51fd488c746efd0f315510616b441ddafe (patch)
tree8b99c80e7945cd951e45e0f80b688afcbff5c272 /src/mailman/runners/tests
parentccf27cb86faeac19fb4045faa8a0624111adb40d (diff)
downloadmailman-755b0d51fd488c746efd0f315510616b441ddafe.tar.gz
mailman-755b0d51fd488c746efd0f315510616b441ddafe.tar.zst
mailman-755b0d51fd488c746efd0f315510616b441ddafe.zip
* Creation of lists with upper case names should be coerced to lower case.
(LP: #1117176)
Diffstat (limited to 'src/mailman/runners/tests')
-rw-r--r--src/mailman/runners/tests/test_lmtp.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/mailman/runners/tests/test_lmtp.py b/src/mailman/runners/tests/test_lmtp.py
index a5c2105d9..bd30fc7aa 100644
--- a/src/mailman/runners/tests/test_lmtp.py
+++ b/src/mailman/runners/tests/test_lmtp.py
@@ -117,3 +117,30 @@ Message-ID: <ant>
# directory in var/queue.
queue_directory = os.path.join(config.QUEUE_DIR, 'lmtp')
self.assertFalse(os.path.isdir(queue_directory))
+
+
+
+class TestBugs(unittest.TestCase):
+ """Test some LMTP related bugs."""
+
+ layer = LMTPLayer
+
+ def setUp(self):
+ self._lmtp = get_lmtp_client(quiet=True)
+ self._lmtp.lhlo('remote.example.org')
+
+ def test_lp1117176(self):
+ # Upper cased list names can't be sent to via LMTP.
+ with transaction():
+ create_list('my-LIST@example.com')
+ self._lmtp.sendmail('anne@example.com', ['my-list@example.com'], """\
+From: anne@example.com
+To: my-list@example.com
+Subject: My subject
+Message-ID: <alpha>
+
+""")
+ messages = get_queue_messages('in')
+ self.assertEqual(len(messages), 1)
+ self.assertEqual(messages[0].msgdata['listname'],
+ 'my-list@example.com')