summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Warsaw2016-09-16 08:51:01 +1200
committerBarry Warsaw2016-09-16 08:51:01 +1200
commit172d94710296873a9aa69c15fd71b4e4feba515e (patch)
tree7e2d307481a7c7934fe19cb7a49fe17955cc26d1 /src
parent47fa9b0759e0fea7449338b2d7aa61d81a6fea44 (diff)
downloadmailman-172d94710296873a9aa69c15fd71b4e4feba515e.tar.gz
mailman-172d94710296873a9aa69c15fd71b4e4feba515e.tar.zst
mailman-172d94710296873a9aa69c15fd71b4e4feba515e.zip
Diffstat (limited to 'src')
-rw-r--r--src/mailman/runners/docs/command.rst20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/mailman/runners/docs/command.rst b/src/mailman/runners/docs/command.rst
index 9e18fe7e0..fec0d628b 100644
--- a/src/mailman/runners/docs/command.rst
+++ b/src/mailman/runners/docs/command.rst
@@ -167,27 +167,29 @@ Similarly, to leave a mailing list, the user need only email the ``-leave`` or
...
... """)
+ >>> from mailman.interfaces.mailinglist import SubscriptionPolicy
+ >>> mlist.unsubscribe_policy = SubscriptionPolicy.open
>>> filebase = inject_message(
... mlist, msg, switchboard='command', subaddress='leave')
>>> command.run()
>>> messages = get_queue_messages('virgin')
>>> len(messages)
- 1
+ 2
>>> print(messages[0].msg.as_string())
+ MIME-Version: 1.0
+ ...
+ Subject: You have been unsubscribed from the Test mailing list
+ From: test-bounces@example.com
+ To: dperson@example.com
+ ...
+
+ >>> print(messages[1].msg.as_string())
Subject: The results of your email commands
From: test-bounces@example.com
To: dperson@example.com
...
<BLANKLINE>
- The results of your email command are provided below.
- <BLANKLINE>
- - Original message details:
- From: dperson@example.com
- Subject: n/a
- Date: ...
- Message-ID: ...
- <BLANKLINE>
- Results:
Dirk Person <dperson@example.com> left test@example.com
<BLANKLINE>