diff options
| author | Barry Warsaw | 2015-03-26 16:06:23 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2015-03-26 16:06:23 -0400 |
| commit | 4731ee37836df748285e3e86f74a7a58cc73d2f5 (patch) | |
| tree | 34db9b5cc29e56cc62733615807317d604e2f188 /src/mailman/rest/docs | |
| parent | af134a5f0555a8ae5098e73c6d75b0a99866e97f (diff) | |
| download | mailman-4731ee37836df748285e3e86f74a7a58cc73d2f5.tar.gz mailman-4731ee37836df748285e3e86f74a7a58cc73d2f5.tar.zst mailman-4731ee37836df748285e3e86f74a7a58cc73d2f5.zip | |
Extended test helper subscribe() which takes an optional email address and
returns the newly created member.
Diffstat (limited to 'src/mailman/rest/docs')
| -rw-r--r-- | src/mailman/rest/docs/membership.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mailman/rest/docs/membership.rst b/src/mailman/rest/docs/membership.rst index 0343f40a1..3cb83a0c8 100644 --- a/src/mailman/rest/docs/membership.rst +++ b/src/mailman/rest/docs/membership.rst @@ -39,6 +39,9 @@ the REST interface. >>> from mailman.testing.helpers import subscribe >>> subscribe(bee, 'Bart') + <Member: Bart Person <bperson@example.com> on bee@example.com + as MemberRole.member> + >>> dump_json('http://localhost:9001/3.0/members') entry 0: address: http://localhost:9001/3.0/addresses/bperson@example.com @@ -69,8 +72,12 @@ Bart's specific membership can be accessed directly: When Cris also joins the mailing list, her subscription is also available via the REST interface. +:: >>> subscribe(bee, 'Cris') + <Member: Cris Person <cperson@example.com> on bee@example.com + as MemberRole.member> + >>> dump_json('http://localhost:9001/3.0/members') entry 0: address: http://localhost:9001/3.0/addresses/bperson@example.com @@ -101,6 +108,8 @@ subscribes, she is returned first. :: >>> subscribe(bee, 'Anna') + <Member: Anna Person <aperson@example.com> on bee@example.com + as MemberRole.member> >>> dump_json('http://localhost:9001/3.0/members') entry 0: @@ -143,7 +152,11 @@ address. Anna and Cris subscribe to this new mailing list. >>> ant = create_list('ant@example.com') >>> subscribe(ant, 'Anna') + <Member: Anna Person <aperson@example.com> on ant@example.com + as MemberRole.member> >>> subscribe(ant, 'Cris') + <Member: Cris Person <cperson@example.com> on ant@example.com + as MemberRole.member> User ids are different than member ids. |
