diff options
| author | Barry Warsaw | 2016-04-18 20:15:41 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2016-04-18 20:15:41 -0400 |
| commit | 10c13959b44db7046abf73c7eee54c2a4ecfa5a0 (patch) | |
| tree | ed3917e54537015e2bfe02f6d600930a298259a9 /src/mailman/model/docs | |
| parent | 7559ce6dfdf2d569c91fea173968e46d6857d730 (diff) | |
| download | mailman-10c13959b44db7046abf73c7eee54c2a4ecfa5a0.tar.gz mailman-10c13959b44db7046abf73c7eee54c2a4ecfa5a0.tar.zst mailman-10c13959b44db7046abf73c7eee54c2a4ecfa5a0.zip | |
Add NEWS, tweak an interface, and rewrite a unit test.
Diffstat (limited to 'src/mailman/model/docs')
| -rw-r--r-- | src/mailman/model/docs/subscriptions.rst | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/mailman/model/docs/subscriptions.rst b/src/mailman/model/docs/subscriptions.rst index deaea36a1..14cb36b71 100644 --- a/src/mailman/model/docs/subscriptions.rst +++ b/src/mailman/model/docs/subscriptions.rst @@ -214,7 +214,7 @@ Members can be removed via this service. Mass Removal ============ -The subscription service can be used to perform mass removals. You are +The subscription service can be used to perform mass removals. You are required to pass the list id of the respective mailing list and a list of email addresses to be removed. @@ -236,20 +236,41 @@ of email addresses to be removed. on bee@example.com as MemberRole.owner> <Member: Anne Person <anne@example.com> on cat@example.com as MemberRole.member> + +There are now two more memberships. + >>> len(service.get_members()) 7 + +But this address is not subscribed to any mailing list. + >>> print(service.find_member('bogus@example.com')) None + +We can unsubscribe some addresses from the ant mailing list. Note that even +though Anne is subscribed several times, only her ant membership with role +``member`` will be removed. + >>> success, fail = service.unsubscribe_members( - ... 'ant.example.com', ['aperson@example.com', - ... 'cperson@example.com', - ... 'bogus@example.com', - ... ]) + ... 'ant.example.com', [ + ... 'aperson@example.com', + ... 'cperson@example.com', + ... 'bogus@example.com', + ... ]) + +There were some successes... + >>> dump_list(success) aperson@example.com cperson@example.com + +...and some failures. + >>> dump_list(fail) bogus@example.com + +And now there are 5 memberships again. + >>> for member in service: ... print(member) <Member: Anne Person <aperson@example.com> |
