diff --git a/src/postorius/forms.py b/src/postorius/forms.py index c18c91f..cf092c3 100644 --- a/src/postorius/forms.py +++ b/src/postorius/forms.py @@ -210,24 +210,78 @@ 'invalid': _('Please enter a valid email address.')}) -class ArchivePolicySettingsForm(forms.Form): +class ListSettingsForm(forms.Form): + """ + Base class for list settings forms. + """ + mlist_properties = [] + + def __init__(self, *args, **kwargs): + self._mlist = kwargs.pop('mlist') + super(ListSettingsForm, self).__init__(*args, **kwargs) + + +SUBSCRIPTION_POLICY_CHOICES = ( + ('', _('Please Choose')), + ('open', _('Open')), + ('confirm', _('Confirm')), + ('moderate', _('Moderate')), + ('confirm_then_moderate', _('Confirm, then moderate')), +) + + +class ListSubscriptionPolicyForm(ListSettingsForm): + """ + List subscription policy settings. + """ + subscription_policy = forms.ChoiceField( + label=_('Subscription Policy'), + choices=SUBSCRIPTION_POLICY_CHOICES, + help_text=_('Set the subscription policy.')) + + +class ArchiveSettingsForm(ListSettingsForm): """ Set the general archive policy. """ + mlist_properties = ['archivers'] + archive_policy_choices = ( - ("public", _("Public Archives")), - ("private", _("Private Archives")), + ("public", _("Public archives")), + ("private", _("Private archives")), ("never", _("Do not archive this list")), ) + archive_policy = forms.ChoiceField( choices=archive_policy_choices, widget=forms.RadioSelect, - label=_('Archive Policy'), + label=_('Archive policy'), help_text=_('Policy for archiving messages for this list'), ) + archivers = forms.MultipleChoiceField( + widget=forms.CheckboxSelectMultiple, + label=_('Active archivers'), + required=False) # May be empty if no archivers are desired. -class MessageAcceptanceForm(forms.Form): + def __init__(self, *args, **kwargs): + super(ArchiveSettingsForm, self).__init__(*args, **kwargs) + self.fields['archivers'].choices = sorted( + [(key, key) for key in sorted(self._mlist.archivers.keys())]) + if self.initial: + self.initial['archivers'] = [ + key for key in sorted(self._mlist.archivers.keys()) + if self._mlist.archivers[key] is True] + + def clean_archivers(self): + result = {} + for archiver, ignore_ in self.fields['archivers'].choices: + result[archiver] = archiver in self.cleaned_data['archivers'] + self.cleaned_data['archivers'] = result + return result + + +class MessageAcceptanceForm(ListSettingsForm): """ List messages acceptance settings. """ @@ -286,7 +340,7 @@ 'If no match is found, then this action is taken.')) -class DigestSettingsForm(forms.Form): +class DigestSettingsForm(ListSettingsForm): """ List digest settings. """ @@ -295,7 +349,7 @@ help_text=_('How big in Kb should a digest be before it gets sent out?')) -class AlterMessagesForm(forms.Form): +class AlterMessagesForm(ListSettingsForm): """ Alter messages list settings. """ @@ -422,7 +476,7 @@ help_text=_('Type of pipeline you want to use for this mailing list')) -class ListAutomaticResponsesForm(forms.Form): +class ListAutomaticResponsesForm(ListSettingsForm): """ List settings for automatic responses. """ @@ -508,7 +562,7 @@ help_text=_('Should administrator get notices of subscribes and unsubscribes?')) -class ListIdentityForm(forms.Form): +class ListIdentityForm(ListSettingsForm): """ List identity settings. """ @@ -546,25 +600,6 @@ ) -SUBSCRIPTION_POLICY_CHOICES = ( - ('', _('Please Choose')), - ('open', _('Open')), - ('confirm', _('Confirm')), - ('moderate', _('Moderate')), - ('confirm_then_moderate', _('Confirm, then moderate')), -) - - -class ListSubscriptionPolicyForm(forms.Form): - """ - List subscription policy settings. - """ - subscription_policy = forms.ChoiceField( - label=_('Subscription Policy'), - choices=SUBSCRIPTION_POLICY_CHOICES, - help_text=_('Set the subscription policy.')) - - class ListArchiverForm(forms.Form): """ Select archivers for a list. diff --git a/src/postorius/templates/postorius/lib/form-horizontal.html b/src/postorius/templates/postorius/lib/form-horizontal.html index 06fe277..0e325cd 100644 --- a/src/postorius/templates/postorius/lib/form-horizontal.html +++ b/src/postorius/templates/postorius/lib/form-horizontal.html @@ -24,6 +24,14 @@ {{ choice.choice_label }} {% endfor %} + {% elif field|fieldtype == 'CheckboxSelectMultiple' %} + {% for choice in field %} +
+ +
+ {% endfor %} {% else %} {{ field|add_form_control }} {% endif %} diff --git a/src/postorius/templates/postorius/menu/list_nav.html b/src/postorius/templates/postorius/menu/list_nav.html index 852875a..53f82e0 100644 --- a/src/postorius/templates/postorius/menu/list_nav.html +++ b/src/postorius/templates/postorius/menu/list_nav.html @@ -24,7 +24,6 @@ - {% endif %} diff --git a/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml b/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml deleted file mode 100644 index 4194c79..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml +++ /dev/null @@ -1,110 +0,0 @@ -interactions: -- request: - body: mail_host=example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/domains - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/domains/example.com'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: fqdn_listname=test_list%40example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/lists - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/lists/test_list.example.com'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/test_list.example.com - response: - body: {string: !!python/unicode '{"display_name": "Test_list", "fqdn_listname": - "test_list@example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_id": "test_list.example.com", "list_name": "test_list", "mail_host": - "example.com", "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1}'} - headers: - content-length: ['324'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers - response: - body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", - "mail-archive": true, "mhonarc": true, "prototype": true}'} - headers: - content-length: ['119'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/test_list.example.com - response: - body: {string: !!python/unicode '{"display_name": "Test_list", "fqdn_listname": - "test_list@example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_id": "test_list.example.com", "list_name": "test_list", "mail_host": - "example.com", "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1}'} - headers: - content-length: ['324'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_ban.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_ban.yaml index 9038106..490e718 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_ban.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_ban.yaml @@ -65,6 +65,22 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/test_list.example.com/bans + response: + body: {string: !!python/unicode '{"entries": [{"email": "banned@example.com", + "http_etag": "\"f97c7e71d9d67fe90f1f8d98429c3fa6a5c76f3d\"", "list_id": "test_list.example.com", + "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned@example.com"}], + "http_etag": "\"3f2107d752512a58b966f626957a8a21f2280abd\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['327'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/test_list.example.com response: body: {string: !!python/unicode '{"display_name": "Test_list", "fqdn_listname": diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_duplicate.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_duplicate.yaml index f2688da..e35b4d9 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_duplicate.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_duplicate.yaml @@ -103,4 +103,20 @@ content-length: ['327'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/test_list.example.com/bans + response: + body: {string: !!python/unicode '{"entries": [{"email": "banned@example.com", + "http_etag": "\"f97c7e71d9d67fe90f1f8d98429c3fa6a5c76f3d\"", "list_id": "test_list.example.com", + "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned@example.com"}], + "http_etag": "\"3f2107d752512a58b966f626957a8a21f2280abd\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['327'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_bans_delete_forms.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_delete_forms.yaml index 6e42a58..dc90b28 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_bans_delete_forms.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_delete_forms.yaml @@ -180,4 +180,36 @@ content-length: ['2137'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/test_list.example.com/bans + response: + body: {string: !!python/unicode '{"entries": [{"email": "banned1@example.com", + "http_etag": "\"31fd4b12c69f84bd2bda2111c15b15eced1f890f\"", "list_id": "test_list.example.com", + "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned1@example.com"}, + {"email": "banned2@example.com", "http_etag": "\"ba6d0d5c1d9a927137dcb6b29d74ab571449be86\"", + "list_id": "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned2@example.com"}, + {"email": "banned3@example.com", "http_etag": "\"c659ef9d7966a17bd73be06cec34fe7eedffe518\"", + "list_id": "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned3@example.com"}, + {"email": "banned4@example.com", "http_etag": "\"f7f52a9b77481b0221e185b2ad1ac0e92be1df5e\"", + "list_id": "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned4@example.com"}, + {"email": "banned5@example.com", "http_etag": "\"e8c1f85a8852257519387b125c10b195a02b37fd\"", + "list_id": "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned5@example.com"}, + {"email": "banned6@example.com", "http_etag": "\"f4d4a3159b921ecc7fcb0ac4736ab592d66ac85f\"", + "list_id": "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned6@example.com"}, + {"email": "banned7@example.com", "http_etag": "\"24739d710562601a44c0c7ef70f18c473d099a9e\"", + "list_id": "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned7@example.com"}, + {"email": "banned8@example.com", "http_etag": "\"aa77f6b65a38219393dbdf81fff7ce94e67ea4bb\"", + "list_id": "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned8@example.com"}, + {"email": "banned9@example.com", "http_etag": "\"51bbc9a5717cac6db2d258e677e8fcaeb0863355\"", + "list_id": "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com/bans/banned9@example.com"}], + "http_etag": "\"e4ba18e67f3919a7a8d4fa7ed61bf1432bae9f12\"", "start": 0, "total_size": + 9}'} + headers: + content-length: ['2137'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_settings.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_settings.yaml index 946d322..3ce001e 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_settings.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_settings.yaml @@ -66,7 +66,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1'] + location: ['http://localhost:9001/3.0/members/19'] status: {code: 201, message: Created} - request: body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com @@ -79,7 +79,631 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/2'] + location: ['http://localhost:9001/3.0/members/20'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/domains/example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "description": + null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": + "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: list_id=foo.example.com&role=owner&subscriber=owner%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/21'] + status: {code: 201, message: Created} +- request: + body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/22'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/domains/example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "description": + null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": + "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: list_id=foo.example.com&role=owner&subscriber=owner%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/23'] + status: {code: 201, message: Created} +- request: + body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/24'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/domains/example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "description": + null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": + "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: list_id=foo.example.com&role=owner&subscriber=owner%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/25'] + status: {code: 201, message: Created} +- request: + body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/26'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/domains/example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "description": + null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": + "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: list_id=foo.example.com&role=owner&subscriber=owner%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/27'] + status: {code: 201, message: Created} +- request: + body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/28'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/domains/example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "description": + null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": + "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: list_id=foo.example.com&role=owner&subscriber=owner%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/29'] + status: {code: 201, message: Created} +- request: + body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/30'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/domains/example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "description": + null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": + "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: list_id=foo.example.com&role=owner&subscriber=owner%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/31'] + status: {code: 201, message: Created} +- request: + body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/members/32'] status: {code: 201, message: Created} - request: body: null diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_settings_access.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_settings_access.yaml index e213d9d..71a7ed1 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_settings_access.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_settings_access.yaml @@ -22,8 +22,8 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'} + "\"b774d488fd2356b7bedf0e6fa4a26dc70dc2b02b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/6", "user_id": 6}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -33,13 +33,13 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/2/addresses + uri: http://localhost:9001/3.0/users/6/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"d66892925a5affe7cea14d53f0bca01231ca8678\"", "original_email": + "http_etag": "\"ec747dd7d53c1dc2e3dac5df82b3757518dc89d1\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"0811f8b56d843ad04a8d71ed461ea6f9dafebdb4\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": 1}'} headers: content-length: ['402'] @@ -53,13 +53,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"aae1006e53c7a99725e6412f9f177c110bb49a8a\"", - "list_id": "foo.example.com", "member_id": 3, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/3", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"abb0989ac0841263d6c94b6411fbae7ebc77ed0f\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"7475d59e1a201b0c92551aadc19aaaa1952913d9\"", + "list_id": "foo.example.com", "member_id": 23, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/23", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"1403da4d95eec57c44321f78ede63f6a84f000e6\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -71,13 +71,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"332c57e9fc51bdfd6e386a2328ac61b79b406fcc\"", "list_id": "foo.example.com", - "member_id": 4, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/4", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"2bdd6d1b84348a9792719ea887d11f7d164a1ce8\"", "start": 0, "total_size": + "\"d64e6bd778895be843b027369ea2e136c531405c\"", "list_id": "foo.example.com", + "member_id": 24, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"d692c8279608f1fa3cfd599f8e4edd2b0273b9b4\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -103,8 +103,8 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'} + "\"b774d488fd2356b7bedf0e6fa4a26dc70dc2b02b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/6", "user_id": 6}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -114,13 +114,13 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/2/addresses + uri: http://localhost:9001/3.0/users/6/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"d66892925a5affe7cea14d53f0bca01231ca8678\"", "original_email": + "http_etag": "\"ec747dd7d53c1dc2e3dac5df82b3757518dc89d1\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"0811f8b56d843ad04a8d71ed461ea6f9dafebdb4\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": 1}'} headers: content-length: ['402'] @@ -134,13 +134,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"aae1006e53c7a99725e6412f9f177c110bb49a8a\"", - "list_id": "foo.example.com", "member_id": 3, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/3", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"abb0989ac0841263d6c94b6411fbae7ebc77ed0f\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"7475d59e1a201b0c92551aadc19aaaa1952913d9\"", + "list_id": "foo.example.com", "member_id": 23, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/23", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"1403da4d95eec57c44321f78ede63f6a84f000e6\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -152,13 +152,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"332c57e9fc51bdfd6e386a2328ac61b79b406fcc\"", "list_id": "foo.example.com", - "member_id": 4, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/4", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"2bdd6d1b84348a9792719ea887d11f7d164a1ce8\"", "start": 0, "total_size": + "\"d64e6bd778895be843b027369ea2e136c531405c\"", "list_id": "foo.example.com", + "member_id": 24, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"d692c8279608f1fa3cfd599f8e4edd2b0273b9b4\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -184,8 +184,8 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'} + "\"b774d488fd2356b7bedf0e6fa4a26dc70dc2b02b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/6", "user_id": 6}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -195,13 +195,13 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/2/addresses + uri: http://localhost:9001/3.0/users/6/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"d66892925a5affe7cea14d53f0bca01231ca8678\"", "original_email": + "http_etag": "\"ec747dd7d53c1dc2e3dac5df82b3757518dc89d1\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"0811f8b56d843ad04a8d71ed461ea6f9dafebdb4\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": 1}'} headers: content-length: ['402'] @@ -215,13 +215,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"aae1006e53c7a99725e6412f9f177c110bb49a8a\"", - "list_id": "foo.example.com", "member_id": 3, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/3", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"abb0989ac0841263d6c94b6411fbae7ebc77ed0f\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"7475d59e1a201b0c92551aadc19aaaa1952913d9\"", + "list_id": "foo.example.com", "member_id": 23, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/23", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"1403da4d95eec57c44321f78ede63f6a84f000e6\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -233,13 +233,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"332c57e9fc51bdfd6e386a2328ac61b79b406fcc\"", "list_id": "foo.example.com", - "member_id": 4, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/4", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"2bdd6d1b84348a9792719ea887d11f7d164a1ce8\"", "start": 0, "total_size": + "\"d64e6bd778895be843b027369ea2e136c531405c\"", "list_id": "foo.example.com", + "member_id": 24, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"d692c8279608f1fa3cfd599f8e4edd2b0273b9b4\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -265,8 +265,8 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'} + "\"b774d488fd2356b7bedf0e6fa4a26dc70dc2b02b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/6", "user_id": 6}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -276,13 +276,13 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/2/addresses + uri: http://localhost:9001/3.0/users/6/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"d66892925a5affe7cea14d53f0bca01231ca8678\"", "original_email": + "http_etag": "\"ec747dd7d53c1dc2e3dac5df82b3757518dc89d1\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"0811f8b56d843ad04a8d71ed461ea6f9dafebdb4\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": 1}'} headers: content-length: ['402'] @@ -296,13 +296,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"aae1006e53c7a99725e6412f9f177c110bb49a8a\"", - "list_id": "foo.example.com", "member_id": 3, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/3", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"abb0989ac0841263d6c94b6411fbae7ebc77ed0f\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"7475d59e1a201b0c92551aadc19aaaa1952913d9\"", + "list_id": "foo.example.com", "member_id": 23, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/23", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"1403da4d95eec57c44321f78ede63f6a84f000e6\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -314,13 +314,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"332c57e9fc51bdfd6e386a2328ac61b79b406fcc\"", "list_id": "foo.example.com", - "member_id": 4, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/4", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"2bdd6d1b84348a9792719ea887d11f7d164a1ce8\"", "start": 0, "total_size": + "\"d64e6bd778895be843b027369ea2e136c531405c\"", "list_id": "foo.example.com", + "member_id": 24, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"d692c8279608f1fa3cfd599f8e4edd2b0273b9b4\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -346,8 +346,8 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'} + "\"b774d488fd2356b7bedf0e6fa4a26dc70dc2b02b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/6", "user_id": 6}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -357,13 +357,13 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/2/addresses + uri: http://localhost:9001/3.0/users/6/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"d66892925a5affe7cea14d53f0bca01231ca8678\"", "original_email": + "http_etag": "\"ec747dd7d53c1dc2e3dac5df82b3757518dc89d1\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"0811f8b56d843ad04a8d71ed461ea6f9dafebdb4\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": 1}'} headers: content-length: ['402'] @@ -377,13 +377,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"aae1006e53c7a99725e6412f9f177c110bb49a8a\"", - "list_id": "foo.example.com", "member_id": 3, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/3", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"abb0989ac0841263d6c94b6411fbae7ebc77ed0f\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"7475d59e1a201b0c92551aadc19aaaa1952913d9\"", + "list_id": "foo.example.com", "member_id": 23, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/23", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"1403da4d95eec57c44321f78ede63f6a84f000e6\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -395,13 +395,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"332c57e9fc51bdfd6e386a2328ac61b79b406fcc\"", "list_id": "foo.example.com", - "member_id": 4, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/4", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"2bdd6d1b84348a9792719ea887d11f7d164a1ce8\"", "start": 0, "total_size": + "\"d64e6bd778895be843b027369ea2e136c531405c\"", "list_id": "foo.example.com", + "member_id": 24, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"d692c8279608f1fa3cfd599f8e4edd2b0273b9b4\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -427,8 +427,8 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'} + "\"b774d488fd2356b7bedf0e6fa4a26dc70dc2b02b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/6", "user_id": 6}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -438,13 +438,13 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/2/addresses + uri: http://localhost:9001/3.0/users/6/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"d66892925a5affe7cea14d53f0bca01231ca8678\"", "original_email": + "http_etag": "\"ec747dd7d53c1dc2e3dac5df82b3757518dc89d1\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"0811f8b56d843ad04a8d71ed461ea6f9dafebdb4\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": 1}'} headers: content-length: ['402'] @@ -458,13 +458,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"aae1006e53c7a99725e6412f9f177c110bb49a8a\"", - "list_id": "foo.example.com", "member_id": 3, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/3", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"abb0989ac0841263d6c94b6411fbae7ebc77ed0f\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"7475d59e1a201b0c92551aadc19aaaa1952913d9\"", + "list_id": "foo.example.com", "member_id": 23, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/23", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"1403da4d95eec57c44321f78ede63f6a84f000e6\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -476,13 +476,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"332c57e9fc51bdfd6e386a2328ac61b79b406fcc\"", "list_id": "foo.example.com", - "member_id": 4, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/4", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"2bdd6d1b84348a9792719ea887d11f7d164a1ce8\"", "start": 0, "total_size": + "\"d64e6bd778895be843b027369ea2e136c531405c\"", "list_id": "foo.example.com", + "member_id": 24, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"d692c8279608f1fa3cfd599f8e4edd2b0273b9b4\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -508,8 +508,8 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'} + "\"b774d488fd2356b7bedf0e6fa4a26dc70dc2b02b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/6", "user_id": 6}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -519,13 +519,13 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/2/addresses + uri: http://localhost:9001/3.0/users/6/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"d66892925a5affe7cea14d53f0bca01231ca8678\"", "original_email": + "http_etag": "\"ec747dd7d53c1dc2e3dac5df82b3757518dc89d1\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"0811f8b56d843ad04a8d71ed461ea6f9dafebdb4\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": 1}'} headers: content-length: ['402'] @@ -539,13 +539,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"aae1006e53c7a99725e6412f9f177c110bb49a8a\"", - "list_id": "foo.example.com", "member_id": 3, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/3", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"abb0989ac0841263d6c94b6411fbae7ebc77ed0f\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"7475d59e1a201b0c92551aadc19aaaa1952913d9\"", + "list_id": "foo.example.com", "member_id": 23, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/23", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"1403da4d95eec57c44321f78ede63f6a84f000e6\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -557,13 +557,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"332c57e9fc51bdfd6e386a2328ac61b79b406fcc\"", "list_id": "foo.example.com", - "member_id": 4, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/4", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"2bdd6d1b84348a9792719ea887d11f7d164a1ce8\"", "start": 0, "total_size": + "\"d64e6bd778895be843b027369ea2e136c531405c\"", "list_id": "foo.example.com", + "member_id": 24, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"d692c8279608f1fa3cfd599f8e4edd2b0273b9b4\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -589,8 +589,8 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"637c12d15eb0203c9ffac9ea2d5ac8605d18e38d\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -600,12 +600,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/1/addresses + uri: http://localhost:9001/3.0/users/5/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"e6d67c65e782700ec282030cc1f46675567d0491\"", "original_email": "owner@example.com", + "\"d69637140095e2552943e259d5cfb5258b3acafa\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6eed867ab84bd2d6cb9b16eba23e7d3811c782b7\"", + "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", "start": 0, "total_size": 1}'} headers: content-length: ['390'] @@ -619,13 +619,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"478a0d66aa61c7b2b12a7f6f0b70afc9508277af\"", - "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/5", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6c16bf67eece007e9ffbb20fd9ddc9f0bc7fe607\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ff499aee6387f8f68cdb6fc128c05161cf91c779\"", + "list_id": "foo.example.com", "member_id": 25, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/25", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"e6b092080585d17443e6e9374b9ee4a87b99167c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -637,13 +637,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"d3e9131d7037ac5eef200d7804c359c2a56752f1\"", "list_id": "foo.example.com", - "member_id": 6, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/6", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"37b6661551e430080d161d97f6bc0cc1617a2dc8\"", "start": 0, "total_size": + "\"89c7506785c867882992ffe6b7d714c495b3a087\"", "list_id": "foo.example.com", + "member_id": 26, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"940c6aa66cb06aafe52ca9ca3afe27bd7d59651d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -716,8 +716,8 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"637c12d15eb0203c9ffac9ea2d5ac8605d18e38d\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -727,12 +727,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/1/addresses + uri: http://localhost:9001/3.0/users/5/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"e6d67c65e782700ec282030cc1f46675567d0491\"", "original_email": "owner@example.com", + "\"d69637140095e2552943e259d5cfb5258b3acafa\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6eed867ab84bd2d6cb9b16eba23e7d3811c782b7\"", + "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", "start": 0, "total_size": 1}'} headers: content-length: ['390'] @@ -746,13 +746,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"478a0d66aa61c7b2b12a7f6f0b70afc9508277af\"", - "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/5", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6c16bf67eece007e9ffbb20fd9ddc9f0bc7fe607\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ff499aee6387f8f68cdb6fc128c05161cf91c779\"", + "list_id": "foo.example.com", "member_id": 25, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/25", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"e6b092080585d17443e6e9374b9ee4a87b99167c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -764,13 +764,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"d3e9131d7037ac5eef200d7804c359c2a56752f1\"", "list_id": "foo.example.com", - "member_id": 6, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/6", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"37b6661551e430080d161d97f6bc0cc1617a2dc8\"", "start": 0, "total_size": + "\"89c7506785c867882992ffe6b7d714c495b3a087\"", "list_id": "foo.example.com", + "member_id": 26, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"940c6aa66cb06aafe52ca9ca3afe27bd7d59651d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -843,8 +843,8 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"637c12d15eb0203c9ffac9ea2d5ac8605d18e38d\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -854,12 +854,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/1/addresses + uri: http://localhost:9001/3.0/users/5/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"e6d67c65e782700ec282030cc1f46675567d0491\"", "original_email": "owner@example.com", + "\"d69637140095e2552943e259d5cfb5258b3acafa\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6eed867ab84bd2d6cb9b16eba23e7d3811c782b7\"", + "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", "start": 0, "total_size": 1}'} headers: content-length: ['390'] @@ -873,13 +873,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"478a0d66aa61c7b2b12a7f6f0b70afc9508277af\"", - "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/5", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6c16bf67eece007e9ffbb20fd9ddc9f0bc7fe607\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ff499aee6387f8f68cdb6fc128c05161cf91c779\"", + "list_id": "foo.example.com", "member_id": 25, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/25", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"e6b092080585d17443e6e9374b9ee4a87b99167c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -891,13 +891,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"d3e9131d7037ac5eef200d7804c359c2a56752f1\"", "list_id": "foo.example.com", - "member_id": 6, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/6", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"37b6661551e430080d161d97f6bc0cc1617a2dc8\"", "start": 0, "total_size": + "\"89c7506785c867882992ffe6b7d714c495b3a087\"", "list_id": "foo.example.com", + "member_id": 26, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"940c6aa66cb06aafe52ca9ca3afe27bd7d59651d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -970,8 +970,8 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"637c12d15eb0203c9ffac9ea2d5ac8605d18e38d\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -981,12 +981,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/1/addresses + uri: http://localhost:9001/3.0/users/5/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"e6d67c65e782700ec282030cc1f46675567d0491\"", "original_email": "owner@example.com", + "\"d69637140095e2552943e259d5cfb5258b3acafa\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6eed867ab84bd2d6cb9b16eba23e7d3811c782b7\"", + "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", "start": 0, "total_size": 1}'} headers: content-length: ['390'] @@ -1000,13 +1000,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"478a0d66aa61c7b2b12a7f6f0b70afc9508277af\"", - "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/5", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6c16bf67eece007e9ffbb20fd9ddc9f0bc7fe607\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ff499aee6387f8f68cdb6fc128c05161cf91c779\"", + "list_id": "foo.example.com", "member_id": 25, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/25", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"e6b092080585d17443e6e9374b9ee4a87b99167c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1018,13 +1018,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"d3e9131d7037ac5eef200d7804c359c2a56752f1\"", "list_id": "foo.example.com", - "member_id": 6, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/6", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"37b6661551e430080d161d97f6bc0cc1617a2dc8\"", "start": 0, "total_size": + "\"89c7506785c867882992ffe6b7d714c495b3a087\"", "list_id": "foo.example.com", + "member_id": 26, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"940c6aa66cb06aafe52ca9ca3afe27bd7d59651d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1097,8 +1097,8 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"637c12d15eb0203c9ffac9ea2d5ac8605d18e38d\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -1108,12 +1108,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/1/addresses + uri: http://localhost:9001/3.0/users/5/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"e6d67c65e782700ec282030cc1f46675567d0491\"", "original_email": "owner@example.com", + "\"d69637140095e2552943e259d5cfb5258b3acafa\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6eed867ab84bd2d6cb9b16eba23e7d3811c782b7\"", + "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", "start": 0, "total_size": 1}'} headers: content-length: ['390'] @@ -1127,13 +1127,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"478a0d66aa61c7b2b12a7f6f0b70afc9508277af\"", - "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/5", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6c16bf67eece007e9ffbb20fd9ddc9f0bc7fe607\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ff499aee6387f8f68cdb6fc128c05161cf91c779\"", + "list_id": "foo.example.com", "member_id": 25, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/25", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"e6b092080585d17443e6e9374b9ee4a87b99167c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1145,13 +1145,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"d3e9131d7037ac5eef200d7804c359c2a56752f1\"", "list_id": "foo.example.com", - "member_id": 6, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/6", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"37b6661551e430080d161d97f6bc0cc1617a2dc8\"", "start": 0, "total_size": + "\"89c7506785c867882992ffe6b7d714c495b3a087\"", "list_id": "foo.example.com", + "member_id": 26, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"940c6aa66cb06aafe52ca9ca3afe27bd7d59651d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1224,8 +1224,8 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"637c12d15eb0203c9ffac9ea2d5ac8605d18e38d\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -1235,12 +1235,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/1/addresses + uri: http://localhost:9001/3.0/users/5/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"e6d67c65e782700ec282030cc1f46675567d0491\"", "original_email": "owner@example.com", + "\"d69637140095e2552943e259d5cfb5258b3acafa\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6eed867ab84bd2d6cb9b16eba23e7d3811c782b7\"", + "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", "start": 0, "total_size": 1}'} headers: content-length: ['390'] @@ -1254,13 +1254,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"478a0d66aa61c7b2b12a7f6f0b70afc9508277af\"", - "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/5", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6c16bf67eece007e9ffbb20fd9ddc9f0bc7fe607\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ff499aee6387f8f68cdb6fc128c05161cf91c779\"", + "list_id": "foo.example.com", "member_id": 25, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/25", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"e6b092080585d17443e6e9374b9ee4a87b99167c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1272,13 +1272,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"d3e9131d7037ac5eef200d7804c359c2a56752f1\"", "list_id": "foo.example.com", - "member_id": 6, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/6", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"37b6661551e430080d161d97f6bc0cc1617a2dc8\"", "start": 0, "total_size": + "\"89c7506785c867882992ffe6b7d714c495b3a087\"", "list_id": "foo.example.com", + "member_id": 26, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"940c6aa66cb06aafe52ca9ca3afe27bd7d59651d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1351,8 +1351,8 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"637c12d15eb0203c9ffac9ea2d5ac8605d18e38d\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -1362,12 +1362,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/1/addresses + uri: http://localhost:9001/3.0/users/5/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"e6d67c65e782700ec282030cc1f46675567d0491\"", "original_email": "owner@example.com", + "\"d69637140095e2552943e259d5cfb5258b3acafa\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6eed867ab84bd2d6cb9b16eba23e7d3811c782b7\"", + "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", "start": 0, "total_size": 1}'} headers: content-length: ['390'] @@ -1381,13 +1381,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"478a0d66aa61c7b2b12a7f6f0b70afc9508277af\"", - "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/5", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6c16bf67eece007e9ffbb20fd9ddc9f0bc7fe607\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ff499aee6387f8f68cdb6fc128c05161cf91c779\"", + "list_id": "foo.example.com", "member_id": 25, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/25", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"e6b092080585d17443e6e9374b9ee4a87b99167c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1399,13 +1399,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"d3e9131d7037ac5eef200d7804c359c2a56752f1\"", "list_id": "foo.example.com", - "member_id": 6, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/6", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"37b6661551e430080d161d97f6bc0cc1617a2dc8\"", "start": 0, "total_size": + "\"89c7506785c867882992ffe6b7d714c495b3a087\"", "list_id": "foo.example.com", + "member_id": 26, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"940c6aa66cb06aafe52ca9ca3afe27bd7d59651d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['497'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1460,6 +1460,71 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo@example.com response: body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", @@ -1789,6 +1854,71 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo.example.com response: body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", @@ -1819,13 +1949,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"573440a46150ae27f0e5124f2481243067427bad\"", - "list_id": "foo.example.com", "member_id": 9, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/9", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6361d9988d114de83fb829ac2a5128ebcb14acdc\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"13ccfad9eeabb2db9df09d3647021a06105e8609\"", + "list_id": "foo.example.com", "member_id": 29, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/29", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"da840766646cf79629b20241a5b240c7571178b7\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1837,10 +1967,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"2bffa5e62d6bdfd9661d0bc013597b9028a12442\"", "list_id": "foo.example.com", - "member_id": 10, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/10", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"830b6aed5cd92390931b607fa836926a4c702b58\"", "start": 0, "total_size": + "\"67c7c01b2bd6c1a21b1107c329f2ba1805564161\"", "list_id": "foo.example.com", + "member_id": 30, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/30", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"91147190c5181951a10297e24a397b2781048dbd\"", "start": 0, "total_size": 1}'} headers: content-length: ['497'] @@ -1881,13 +2011,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"573440a46150ae27f0e5124f2481243067427bad\"", - "list_id": "foo.example.com", "member_id": 9, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/9", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6361d9988d114de83fb829ac2a5128ebcb14acdc\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"13ccfad9eeabb2db9df09d3647021a06105e8609\"", + "list_id": "foo.example.com", "member_id": 29, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/29", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"da840766646cf79629b20241a5b240c7571178b7\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1899,10 +2029,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"2bffa5e62d6bdfd9661d0bc013597b9028a12442\"", "list_id": "foo.example.com", - "member_id": 10, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/10", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"830b6aed5cd92390931b607fa836926a4c702b58\"", "start": 0, "total_size": + "\"67c7c01b2bd6c1a21b1107c329f2ba1805564161\"", "list_id": "foo.example.com", + "member_id": 30, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/30", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"91147190c5181951a10297e24a397b2781048dbd\"", "start": 0, "total_size": 1}'} headers: content-length: ['497'] @@ -1943,13 +2073,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"573440a46150ae27f0e5124f2481243067427bad\"", - "list_id": "foo.example.com", "member_id": 9, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/9", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6361d9988d114de83fb829ac2a5128ebcb14acdc\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"13ccfad9eeabb2db9df09d3647021a06105e8609\"", + "list_id": "foo.example.com", "member_id": 29, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/29", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"da840766646cf79629b20241a5b240c7571178b7\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1961,10 +2091,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"2bffa5e62d6bdfd9661d0bc013597b9028a12442\"", "list_id": "foo.example.com", - "member_id": 10, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/10", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"830b6aed5cd92390931b607fa836926a4c702b58\"", "start": 0, "total_size": + "\"67c7c01b2bd6c1a21b1107c329f2ba1805564161\"", "list_id": "foo.example.com", + "member_id": 30, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/30", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"91147190c5181951a10297e24a397b2781048dbd\"", "start": 0, "total_size": 1}'} headers: content-length: ['497'] @@ -2005,13 +2135,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"573440a46150ae27f0e5124f2481243067427bad\"", - "list_id": "foo.example.com", "member_id": 9, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/9", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6361d9988d114de83fb829ac2a5128ebcb14acdc\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"13ccfad9eeabb2db9df09d3647021a06105e8609\"", + "list_id": "foo.example.com", "member_id": 29, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/29", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"da840766646cf79629b20241a5b240c7571178b7\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -2023,10 +2153,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"2bffa5e62d6bdfd9661d0bc013597b9028a12442\"", "list_id": "foo.example.com", - "member_id": 10, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/10", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"830b6aed5cd92390931b607fa836926a4c702b58\"", "start": 0, "total_size": + "\"67c7c01b2bd6c1a21b1107c329f2ba1805564161\"", "list_id": "foo.example.com", + "member_id": 30, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/30", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"91147190c5181951a10297e24a397b2781048dbd\"", "start": 0, "total_size": 1}'} headers: content-length: ['497'] @@ -2067,13 +2197,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"573440a46150ae27f0e5124f2481243067427bad\"", - "list_id": "foo.example.com", "member_id": 9, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/9", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6361d9988d114de83fb829ac2a5128ebcb14acdc\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"13ccfad9eeabb2db9df09d3647021a06105e8609\"", + "list_id": "foo.example.com", "member_id": 29, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/29", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"da840766646cf79629b20241a5b240c7571178b7\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -2085,10 +2215,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"2bffa5e62d6bdfd9661d0bc013597b9028a12442\"", "list_id": "foo.example.com", - "member_id": 10, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/10", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"830b6aed5cd92390931b607fa836926a4c702b58\"", "start": 0, "total_size": + "\"67c7c01b2bd6c1a21b1107c329f2ba1805564161\"", "list_id": "foo.example.com", + "member_id": 30, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/30", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"91147190c5181951a10297e24a397b2781048dbd\"", "start": 0, "total_size": 1}'} headers: content-length: ['497'] @@ -2129,13 +2259,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"573440a46150ae27f0e5124f2481243067427bad\"", - "list_id": "foo.example.com", "member_id": 9, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/9", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6361d9988d114de83fb829ac2a5128ebcb14acdc\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"13ccfad9eeabb2db9df09d3647021a06105e8609\"", + "list_id": "foo.example.com", "member_id": 29, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/29", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"da840766646cf79629b20241a5b240c7571178b7\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -2147,10 +2277,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"2bffa5e62d6bdfd9661d0bc013597b9028a12442\"", "list_id": "foo.example.com", - "member_id": 10, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/10", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"830b6aed5cd92390931b607fa836926a4c702b58\"", "start": 0, "total_size": + "\"67c7c01b2bd6c1a21b1107c329f2ba1805564161\"", "list_id": "foo.example.com", + "member_id": 30, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/30", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"91147190c5181951a10297e24a397b2781048dbd\"", "start": 0, "total_size": 1}'} headers: content-length: ['497'] @@ -2191,13 +2321,13 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"573440a46150ae27f0e5124f2481243067427bad\"", - "list_id": "foo.example.com", "member_id": 9, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/9", "user": - "http://localhost:9001/3.0/users/1"}], "http_etag": "\"6361d9988d114de83fb829ac2a5128ebcb14acdc\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"13ccfad9eeabb2db9df09d3647021a06105e8609\"", + "list_id": "foo.example.com", "member_id": 29, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/29", "user": + "http://localhost:9001/3.0/users/5"}], "http_etag": "\"da840766646cf79629b20241a5b240c7571178b7\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['485'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -2209,10 +2339,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"2bffa5e62d6bdfd9661d0bc013597b9028a12442\"", "list_id": "foo.example.com", - "member_id": 10, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/10", "user": "http://localhost:9001/3.0/users/2"}], - "http_etag": "\"830b6aed5cd92390931b607fa836926a4c702b58\"", "start": 0, "total_size": + "\"67c7c01b2bd6c1a21b1107c329f2ba1805564161\"", "list_id": "foo.example.com", + "member_id": 30, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/30", "user": "http://localhost:9001/3.0/users/6"}], + "http_etag": "\"91147190c5181951a10297e24a397b2781048dbd\"", "start": 0, "total_size": 1}'} headers: content-length: ['497'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_settings_archivers.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_settings_archivers.yaml new file mode 100644 index 0000000..72e20c6 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_settings_archivers.yaml @@ -0,0 +1,264 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": + true, "admin_notify_mchanges": false, "administrivia": true, "advertised": + true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": + "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": + "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", + "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": + "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": + false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", + "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": + null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": + "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": + false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", + "http_etag": "\"4d90227445fe59860c01275cf1b0633c27f87673\"", "include_rfc2369_headers": + true, "join_address": "foo-join@example.com", "last_post_at": null, "leave_address": + "foo-leave@example.com", "list_name": "foo", "mail_host": "example.com", "next_digest_number": + 1, "no_reply_address": "noreply@example.com", "owner_address": "foo-owner@example.com", + "post_id": 1, "posting_address": "foo@example.com", "posting_pipeline": "default-posting-pipeline", + "reply_goes_to_list": "no_munging", "reply_to_address": "", "request_address": + "foo-request@example.com", "scheme": "http", "send_welcome_message": true, + "subject_prefix": "[Foo] ", "subscription_policy": "confirm", "volume": 1, + "web_host": "example.com", "welcome_message_uri": "mailman:///welcome.txt"}'} + headers: + content-length: ['1703'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": + true, "admin_notify_mchanges": false, "administrivia": true, "advertised": + true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": + "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": + "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", + "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": + "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": + false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", + "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": + null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": + "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": + false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", + "http_etag": "\"4d90227445fe59860c01275cf1b0633c27f87673\"", "include_rfc2369_headers": + true, "join_address": "foo-join@example.com", "last_post_at": null, "leave_address": + "foo-leave@example.com", "list_name": "foo", "mail_host": "example.com", "next_digest_number": + 1, "no_reply_address": "noreply@example.com", "owner_address": "foo-owner@example.com", + "post_id": 1, "posting_address": "foo@example.com", "posting_pipeline": "default-posting-pipeline", + "reply_goes_to_list": "no_munging", "reply_to_address": "", "request_address": + "foo-request@example.com", "scheme": "http", "send_welcome_message": true, + "subject_prefix": "[Foo] ", "subscription_policy": "confirm", "volume": 1, + "web_host": "example.com", "welcome_message_uri": "mailman:///welcome.txt"}'} + headers: + content-length: ['1703'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: mail-archive=False&mhonarc=False + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode PATCH + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: !!python/unicode + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode PATCH + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: !!python/unicode + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode PATCH + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"f8ecaeeadc4cf5d8900d7c7ed3990e675116ad31\"", + "mail-archive": false, "mhonarc": false, "prototype": true}'} + headers: + content-length: ['121'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_settings_archiving.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_settings_archiving.yaml index c2461bf..0ea6e2e 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_settings_archiving.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_settings_archiving.yaml @@ -83,6 +83,71 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo.example.com response: body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", @@ -98,6 +163,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo@example.com/config response: body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": @@ -126,6 +204,43 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"3dbbbaad592a043938314db0e5249a1ca71d0dc6\"", + "mail-archive": true, "mhonarc": true, "prototype": true}'} + headers: + content-length: ['119'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: mail-archive=False&mhonarc=False&prototype=False + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode PATCH + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: !!python/unicode + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode PATCH + uri: http://localhost:9001/3.0/lists/foo.example.com/archivers + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: body: archive_policy=private headers: accept-encoding: ['gzip, deflate'] diff --git a/src/postorius/tests/mailman_api_tests/test_archival_options.py b/src/postorius/tests/mailman_api_tests/test_archival_options.py deleted file mode 100644 index 62f91a2..0000000 --- a/src/postorius/tests/mailman_api_tests/test_archival_options.py +++ /dev/null @@ -1,165 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2012-2015 by the Free Software Foundation, Inc. -# -# This file is part of Postorius. -# -# Postorius is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# Postorius is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along with -# Postorius. If not, see . -"""Tests for Archival Options""" - - -from __future__ import ( - absolute_import, division, print_function, unicode_literals) - -__metaclass__ = type - - -import mock -import logging - -from django.conf import settings -from django.contrib.auth.models import User -from django.core.urlresolvers import reverse -from django.test import Client, RequestFactory, TestCase -try: - from urllib2 import HTTPError -except ImportError: - from urllib.error import HTTPError - -from postorius.forms import ListArchiverForm -from postorius.tests import MM_VCR -from postorius.utils import get_client -from postorius.views.list import _add_archival_messages - - -logger = logging.getLogger(__name__) -vcr_log = logging.getLogger('vcr') -vcr_log.setLevel(logging.WARNING) - - -class ArchivalOptionsAccessTest(TestCase): - - @MM_VCR.use_cassette('archival_options.yaml') - def setUp(self): - # Create domain `example.com` in Mailman - example_com = get_client().create_domain('example.com') - self.m_list = example_com.create_list('test_list') - self.test_user = User.objects.create_user( - 'test_user', 'test_user@example.com', 'pwd') - self.test_superuser = User.objects.create_superuser( - 'test_superuser', 'test_superuser@example.com', 'pwd') - - @MM_VCR.use_cassette('archival_options.yaml') - def tearDown(self): - self.test_user.delete() - self.test_superuser.delete() - self.m_list.delete() - get_client().delete_domain('example.com') - - @MM_VCR.use_cassette('archival_options.yaml') - def test_no_access_for_unauthenticated_user(self): - response = self.client.get(reverse('list_archival_options', - args=('test_list.example.com', ))) - self.assertEqual(response.status_code, 302) - self.assertIn(reverse(settings.LOGIN_URL), response['location']) - - @MM_VCR.use_cassette('archival_options.yaml') - def test_access_for_superuser(self): - self.client.login(username=self.test_superuser.username, - password='pwd') - response = self.client.get(reverse('list_archival_options', - args=('test_list.example.com', ))) - self.assertEqual(response.status_code, 200) - - -class ArchivalOptions(TestCase): - - @MM_VCR.use_cassette('test_list_archival_options.yaml') - def setUp(self): - # Create domain `example.com` in Mailman. - example_com = get_client().create_domain('example.com') - self.m_list = example_com.create_list('test_list') - self.test_user = User.objects.create_user( - 'test_user', 'test_user@example.com', 'pwd') - self.test_superuser = User.objects.create_superuser( - 'test_superuser', 'test_superuser@example.com', 'pwd') - self.client.login(username=self.test_superuser.username, - password='pwd') - - @MM_VCR.use_cassette('test_list_archival_options.yaml') - def tearDown(self): - self.test_user.delete() - self.test_superuser.delete() - self.m_list.delete() - get_client().delete_domain('example.com') - - @MM_VCR.use_cassette('test_list_archival_options.yaml') - def test_context_contains_list_archivers(self): - response = self.client.get(reverse('list_archival_options', - args=('test_list.example.com', ))) - self.assertTrue('archivers' in response.context) - - @MM_VCR.use_cassette('test_list_archival_options.yaml') - def test_context_contains_the_right_form(self): - response = self.client.get(reverse('list_archival_options', - args=('test_list.example.com', ))) - self.assertEqual(type(response.context['form']), ListArchiverForm) - - def test_post_data_is_correctly_processed(self): - with MM_VCR.use_cassette('test_list_archival_options.yaml'): - archivers = self.m_list.archivers - # Archiver is enabled by default. - self.assertTrue(archivers['mail-archive']) - - with MM_VCR.use_cassette('test_list_archival_options_disable_archiver.yaml'): - # Archiver is disabled after it's deactivated in the form. - response = self.client.post( - reverse('list_archival_options', args=('test_list.example.com', )), - {'archivers': ['mhonarc', 'prototype']}) - self.assertFalse(self.m_list.archivers['mail-archive']) - - with MM_VCR.use_cassette('test_list_archival_options_enable_archiver.yaml'): - # Archiver is disabled after it's deactivated in the form. - response = self.client.post( - reverse('list_archival_options', args=('test_list.example.com', )), - {'archivers': ['mail-archive']}) - self.assertTrue(self.m_list.archivers['mail-archive']) - - -class ArchivalMessagesTest(TestCase): - """ - Tests the ``_add_archival_messages`` helper method. - """ - - def setUp(self): - factory = RequestFactory() - self.request = factory.get('/') - - @mock.patch('django.contrib.messages.success') - @mock.patch('django.contrib.messages.warning') - def test_warning_messages(self, mock_warning, mock_success): - # foo-archiver enabled, but not stored adds warning message. - _add_archival_messages(['foo-archiver'], [], {'foo-archiver': False}, self.request) - self.assertTrue('could not be enabled' in mock_warning.call_args[0][1]) - self.assertTrue('foo-archiver' in mock_warning.call_args[0][1]) - # messages.success should not have been called. - self.assertEqual(mock_success.call_count, 0) - - @mock.patch('django.contrib.messages.success') - @mock.patch('django.contrib.messages.warning') - def test_success_messages(self, mock_warning, mock_success): - # foo-archiver enabled and stored adds success message. - _add_archival_messages(['foo-archiver'], [], {'foo-archiver': True}, self.request) - self.assertTrue('activated new archivers' in mock_success.call_args[0][1]) - self.assertTrue('foo-archiver' in mock_success.call_args[0][1]) - # messages.warning should not have been called. - self.assertEqual(mock_warning.call_count, 0) diff --git a/src/postorius/tests/mailman_api_tests/test_list_settings.py b/src/postorius/tests/mailman_api_tests/test_list_settings.py index ff2ddb6..ff0ae0c 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_settings.py +++ b/src/postorius/tests/mailman_api_tests/test_list_settings.py @@ -119,7 +119,7 @@ self.assertEqual(response.status_code, 200) @MM_VCR.use_cassette('list_settings_archiving.yaml') - def test_archiving(self): + def test_archiving_policy(self): self.assertEqual(self.foo_list.settings['archive_policy'], 'public') self.client.login(username='testsu', password='testpass') url = reverse('list_settings', args=('foo.example.com', 'archiving')) @@ -136,3 +136,25 @@ # Get a new list object to avoid caching m_list = List.objects.get(fqdn_listname='foo.example.com') self.assertEqual(m_list.settings['archive_policy'], 'private') + + @MM_VCR.use_cassette('list_settings_archivers.yaml') + def test_archivers(self): + self.assertEqual(dict(self.foo_list.archivers), + {'mhonarc': True, 'prototype': True, 'mail-archive': True}) + self.client.login(username='testsu', password='testpass') + url = reverse('list_settings', args=('foo.example.com', 'archiving')) + response = self.client.get(url) + self.assertEqual(response.status_code, 200) + self.assertEqual(response.context["form"].initial['archivers'], + ['mail-archive', 'mhonarc', 'prototype']) + response = self.client.post(url, + {'archive_policy': 'public', 'archivers': ['prototype']}) + self.assertEqual(response.status_code, 302) + self.assertEqual(response['location'], 'http://testserver' + url) + msgs = get_flash_messages(response) + self.assertEqual(len(msgs), 1) + self.assertEqual(msgs[0].level, messages.SUCCESS, msgs[0].message) + # Get a new list object to avoid caching + m_list = List.objects.get(fqdn_listname='foo.example.com') + self.assertEqual(dict(m_list.archivers), + {'mhonarc': False, 'prototype': True, 'mail-archive': False}) diff --git a/src/postorius/urls.py b/src/postorius/urls.py index f14f2fd..606d37b 100644 --- a/src/postorius/urls.py +++ b/src/postorius/urls.py @@ -81,9 +81,6 @@ name='list_settings'), url(r'^unsubscribe_all$', 'remove_all_subscribers', name='unsubscribe_all'), - url(r'^archival_options$', - 'list_archival_options', - name='list_archival_options'), ) urlpatterns = patterns( diff --git a/src/postorius/views/list.py b/src/postorius/views/list.py index 1a0347b..2b2d75d 100644 --- a/src/postorius/views/list.py +++ b/src/postorius/views/list.py @@ -636,7 +636,7 @@ 'alter_messages': AlterMessagesForm, 'digest': DigestSettingsForm, 'message_acceptance': MessageAcceptanceForm, - 'archiving': ArchivePolicySettingsForm, + 'archiving': ArchiveSettingsForm, 'subscription_policy': ListSubscriptionPolicyForm, } @@ -668,18 +668,21 @@ return utils.render_api_error(request) # List settings are grouped an processed in different forms. if request.method == 'POST': - form = form_class(request.POST) + form = form_class(request.POST, mlist=m_list) if form.is_valid(): try: for key in form.fields.keys(): - list_settings[key] = form.cleaned_data[key] + if key in form_class.mlist_properties: + setattr(m_list, key, form.cleaned_data[key]) + else: + list_settings[key] = form.cleaned_data[key] list_settings.save() messages.success(request, _('The settings have been updated.')) except HTTPError as e: messages.error(request, _('An error occured: %s') % e.reason) return redirect('list_settings', m_list.list_id, visible_section) else: - form = form_class(initial=list_settings) + form = form_class(initial=dict(list_settings), mlist=m_list) return render(request, template, { 'form': form, @@ -739,40 +742,6 @@ context_instance=RequestContext(request)) -def _add_archival_messages(to_activate, to_disable, after_submission, - request): - """ - Add feedback messages to session, depending on previously set archivers. - """ - # There are archivers to enable. - if len(to_activate) > 0: - # If the archiver shows up in the data set *after* the update, - # we can show a success message. - activation_postponed = [] - activation_success = [] - for archiver in to_activate: - if after_submission[archiver] is True: - activation_success.append(archiver) - else: - activation_postponed.append(archiver) - # If archivers couldn't be updated, show a message: - if len(activation_postponed) > 0: - messages.warning(request, - _('Some archivers could not be enabled, probably ' - 'because they are not enabled in the Mailman ' - 'configuration. They will be enabled for ' - 'this list, if the archiver is enabled in the ' - 'Mailman configuration. %s.') % - ', '.join(activation_postponed)) - if len(activation_success) > 0: - messages.success(request, _('You activated new archivers for this list: %s') % - ', '.join(activation_success)) - # There are archivers to disable. - if len(to_disable) > 0: - messages.success(request, _('You disabled the following archivers: %s') % - ', '.join(to_disable)) - - @login_required @list_owner_required def remove_all_subscribers(request, list_id): @@ -801,49 +770,6 @@ @login_required @list_owner_required -def list_archival_options(request, list_id): - """ - Activate or deactivate list archivers. - """ - # Get the list and cache the archivers property. - m_list = List.objects.get_or_404(fqdn_listname=list_id) - archivers = m_list.archivers - - # Process form submission. - if request.method == 'POST': - current = [key for key in archivers.keys() if archivers[key]] - posted = request.POST.getlist('archivers') - - # These should be activated - to_activate = [arc for arc in posted if arc not in current] - for arc in to_activate: - archivers[arc] = True - # These should be disabled - to_disable = [arc for arc in current if arc not in posted and - arc in current] - for arc in to_disable: - archivers[arc] = False - - # Re-cache list of archivers after update. - archivers = m_list.archivers - - # Show success/error messages. - _add_archival_messages(to_activate, to_disable, archivers, request) - - # Instantiate form with current archiver data. - initial = {'archivers': [key for key in archivers.keys() - if archivers[key] is True]} - form = ListArchiverForm(initial=initial, archivers=archivers) - - return render_to_response('postorius/lists/archival_options.html', - {'list': m_list, - 'form': form, - 'archivers': archivers}, - context_instance=RequestContext(request)) - - -@login_required -@list_owner_required def list_bans(request, list_id): """ Ban or unban email addresses.