diff --git a/src/postorius/forms.py b/src/postorius/forms.py index 708165e..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. @@ -629,6 +664,18 @@ layout = [["Mass Removal", "emails"]] +class ListAddBanForm(forms.Form): + """Ban an email address for a list.""" + email = forms.CharField( + label=_('Add ban'), + help_text=_( + 'You can ban a single email address or use a regular expression ' + 'to match similar email addresses.'), + error_messages={ + 'required': _('Please enter an email adddress.'), + 'invalid': _('Please enter a valid email adddress.')}) + + class UserPreferences(FieldsetForm): """ diff --git a/src/postorius/static/postorius/css/style.css b/src/postorius/static/postorius/css/style.css index d902126..894097c 100644 --- a/src/postorius/static/postorius/css/style.css +++ b/src/postorius/static/postorius/css/style.css @@ -24,3 +24,10 @@ .margin-bottom { margin-bottom: 1em; } + +form.bans-add-form { + margin-bottom: 2.5em; +} +table.bans-current { + width: auto; +} 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/lists/bans.html b/src/postorius/templates/postorius/lists/bans.html new file mode 100644 index 0000000..9d57940 --- /dev/null +++ b/src/postorius/templates/postorius/lists/bans.html @@ -0,0 +1,64 @@ +{% extends postorius_base_template %} +{% load i18n %} +{% load bootstrap_tags %} +{% load nav_helpers %} + +{% block subtitle %} +{% trans 'Banned addresses' %} | {{ list.fqdn_listname }} +{% endblock %} + +{% block main %} + + {% list_nav 'list_bans' 'Banned addresses' %} + + +
+ {% csrf_token %} +
+ {% if addban_form.email.errors %} +
{{ addban_form.email.errors }}
+ {% endif %} + {{ addban_form.email.label_tag }} + {{ addban_form.email|add_form_control }} +
+
+ +
+

+ {{ addban_form.email.help_text }} +

+
+ + +

{% trans 'Currently banned addresses' %}

+ + {% with list_bans=list.bans %} + + {% if list_bans|length > 0 %} + + + {% for ban in list.bans %} + + + + + {% endfor %} + +
{{ ban.email }} +
+ {% csrf_token %} + + +
+
+ {% else %} +

{% trans 'No addresses are currently banned.' %}

+ {% endif %} + + {% endwith %} + +{% endblock %} + diff --git a/src/postorius/templates/postorius/menu/list_nav.html b/src/postorius/templates/postorius/menu/list_nav.html index 4349819..53f82e0 100644 --- a/src/postorius/templates/postorius/menu/list_nav.html +++ b/src/postorius/templates/postorius/menu/list_nav.html @@ -23,7 +23,7 @@ - + {% 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.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_bans.yaml new file mode 100644 index 0000000..79ae65b --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_bans.yaml @@ -0,0 +1,745 @@ +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/bans + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} + headers: + content-length: ['90'] + 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} +- 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 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} +- 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 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} +- 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/bans + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} + headers: + content-length: ['90'] + 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} +- 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 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} +- 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 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} +- 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 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} +- 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 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} +- 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/users/test_user@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/test_list.example.com/roster/owner + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} + headers: + content-length: ['90'] + 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/roster/moderator + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} + headers: + content-length: ['90'] + 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 new file mode 100644 index 0000000..490e718 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_ban.yaml @@ -0,0 +1,109 @@ +interactions: +- 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: email=banned%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned@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/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/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": + "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/bans/banned@example.com + response: + body: {string: !!python/unicode '{"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"}'} + headers: + content-length: ['222'] + 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_add_duplicate.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_duplicate.yaml new file mode 100644 index 0000000..e35b4d9 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_add_duplicate.yaml @@ -0,0 +1,122 @@ +interactions: +- 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: email=banned%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned@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/bans/banned@example.com + response: + body: {string: !!python/unicode '{"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"}'} + headers: + content-length: ['222'] + 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: email=banned%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/test_list.example.com/bans + response: + body: {string: !!python/unicode Address is already banned} + headers: + content-length: ['25'] + content-type: [application/json; charset=utf-8] + status: {code: 400, message: Bad Request} +- 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/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/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_del_ban.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_del_ban.yaml new file mode 100644 index 0000000..81c50b9 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_del_ban.yaml @@ -0,0 +1,129 @@ +interactions: +- 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: email=banned%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned@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/bans/banned@example.com + response: + body: {string: !!python/unicode '{"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"}'} + headers: + content-length: ['222'] + 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 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 DELETE + uri: http://localhost:9001/3.0/lists/test_list.example.com/bans/banned@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 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/bans + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} + headers: + content-length: ['90'] + 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/banned@example.com + response: + body: {string: !!python/unicode 'Email is not banned: banned@example.com'} + headers: + content-length: ['39'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_bans_del_unknown_ban.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_del_unknown_ban.yaml new file mode 100644 index 0000000..a663f84 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_del_unknown_ban.yaml @@ -0,0 +1,88 @@ +interactions: +- 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/bans/banned@example.com + response: + body: {string: !!python/unicode 'Email is not banned: banned@example.com'} + headers: + content-length: ['39'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +- 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/bans + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} + headers: + content-length: ['90'] + 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 GET + uri: http://localhost:9001/3.0/lists/test_list.example.com/bans + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} + headers: + content-length: ['90'] + 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 new file mode 100644 index 0000000..dc90b28 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_bans_delete_forms.yaml @@ -0,0 +1,215 @@ +interactions: +- 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: email=banned1%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned1@example.com'] + status: {code: 201, message: Created} +- request: + body: email=banned2%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned2@example.com'] + status: {code: 201, message: Created} +- request: + body: email=banned3%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned3@example.com'] + status: {code: 201, message: Created} +- request: + body: email=banned4%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned4@example.com'] + status: {code: 201, message: Created} +- request: + body: email=banned5%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned5@example.com'] + status: {code: 201, message: Created} +- request: + body: email=banned6%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned6@example.com'] + status: {code: 201, message: Created} +- request: + body: email=banned7%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned7@example.com'] + status: {code: 201, message: Created} +- request: + body: email=banned8%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned8@example.com'] + status: {code: 201, message: Created} +- request: + body: email=banned9%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/test_list.example.com/bans + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/lists/test_list.example.com/bans/banned9@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/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} +- 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 new file mode 100644 index 0000000..3ce001e --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_settings.yaml @@ -0,0 +1,730 @@ +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=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/19'] + 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/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 + 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} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_settings_access.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_settings_access.yaml new file mode 100644 index 0000000..71a7ed1 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_settings_access.yaml @@ -0,0 +1,2351 @@ +interactions: +- 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/users/moderator@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/6/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", + "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/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['402'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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/users/moderator@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/6/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", + "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/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['402'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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/users/moderator@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/6/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", + "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/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['402'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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/users/moderator@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/6/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", + "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/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['402'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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/users/moderator@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/6/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", + "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/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['402'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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/users/moderator@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/6/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", + "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/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['402'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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/users/moderator@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/6/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", + "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/6"}], + "http_etag": "\"e912c0fa7b456f2f4b6f1841ae6d573072b49f2b\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['402'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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/users/owner@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/5/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": + "\"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/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['390'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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 + 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/users/owner@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/5/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": + "\"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/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['390'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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 + 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/users/owner@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/5/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": + "\"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/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['390'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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 + 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/users/owner@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/5/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": + "\"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/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['390'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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 + 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/users/owner@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/5/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": + "\"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/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['390'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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 + 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/users/owner@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/5/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": + "\"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/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['390'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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 + 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/users/owner@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/5/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": + "\"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/5"}], "http_etag": "\"abd6991d7cfc1ad5563ad5020a42c2ec5b88538a\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['390'] + 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/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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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: ['497'] + 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/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 + 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 + 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 + 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 + 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 + 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 + 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/users/test@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + 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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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'] + 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/users/test@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + 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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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'] + 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/users/test@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + 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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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'] + 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/users/test@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + 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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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'] + 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/users/test@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + 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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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'] + 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/users/test@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + 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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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'] + 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/users/test@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + 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": "\"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: ['485'] + 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/roster/moderator + 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": + "\"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'] + 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_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 new file mode 100644 index 0000000..0ea6e2e --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_settings_archiving.yaml @@ -0,0 +1,302 @@ +interactions: +- 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 + 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&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'] + !!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/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": + "private", "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": "\"ee2b013f388534986873dd50897c63326f8fc57d\"", "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: ['1704'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +version: 1 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 f368d82..0000000 --- a/src/postorius/tests/mailman_api_tests/test_archival_options.py +++ /dev/null @@ -1,163 +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.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, 403) - - @MM_VCR.use_cassette('archival_options.yaml') - def test_no_access_for_unauthenticated_user(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_bans.py b/src/postorius/tests/mailman_api_tests/test_list_bans.py new file mode 100644 index 0000000..0c2e014 --- /dev/null +++ b/src/postorius/tests/mailman_api_tests/test_list_bans.py @@ -0,0 +1,160 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2016 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 ban lists""" + +from __future__ import absolute_import, print_function, unicode_literals + +import mock +import logging + +from django.contrib import messages +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.tests import MM_VCR +from postorius.tests.utils import get_flash_messages +from postorius.utils import get_client + + +logger = logging.getLogger(__name__) +vcr_log = logging.getLogger('vcr') +vcr_log.setLevel(logging.WARNING) + + +class ListBansTest(TestCase): + + @MM_VCR.use_cassette('list_bans.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="test_superuser", password='pwd') + self.url = reverse('list_bans', args=['test_list.example.com']) + + @MM_VCR.use_cassette('list_bans.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('list_bans.yaml') + def test_login_redirect_for_anonymous(self): + self.client.logout() + response = self.client.get(self.url) + self.assertEqual(response.status_code, 302) + + @MM_VCR.use_cassette('list_bans.yaml') + def test_no_access_for_basic_user(self): + self.client.logout() + self.client.login(username="test_user", password='pwd') + response = self.client.get(self.url) + self.assertEqual(response.status_code, 403) + + @MM_VCR.use_cassette('list_bans.yaml') + def test_access_for_superuser(self): + response = self.client.get(self.url) + self.assertEqual(response.status_code, 200) + + @MM_VCR.use_cassette('list_bans.yaml') + def test_context_contains_create_form(self): + response = self.client.get(self.url) + self.assertEqual(response.status_code, 200) + self.assertTrue('addban_form' in response.context) + self.assertContains(response, + '') + self.assertContains(response, + '') + + @MM_VCR.use_cassette('list_bans_delete_forms.yaml') + def test_context_contains_delete_forms(self): + banned = ["banned{}@example.com".format(i) for i in range(1,10)] + for ban in banned: + self.m_list.bans.add(ban) + response = self.client.get(self.url) + self.assertEqual(response.status_code, 200) + for ban in banned: + self.assertContains(response, + '' % ban) + self.assertContains(response, + '