diff --git a/src/postorius/fieldset_forms.py b/src/postorius/fieldset_forms.py index f8634e0..01550b4 100644 --- a/src/postorius/fieldset_forms.py +++ b/src/postorius/fieldset_forms.py @@ -19,7 +19,7 @@ from django.forms import Form from django.utils import safestring from django.forms.forms import BoundField -from django.forms.util import ErrorList +from django.forms.utils import ErrorList class FieldsetError(Exception): diff --git a/src/postorius/forms.py b/src/postorius/forms.py index 312b263..2a78b31 100644 --- a/src/postorius/forms.py +++ b/src/postorius/forms.py @@ -188,21 +188,138 @@ 'invalid': _('Please enter a valid email address.')}) -class ListSettings(FieldsetForm): - - """Form fields dealing with the list settings. +class ArchivePolicySettingsForm(forms.Form): """ - choices = ((True, _('Yes')), (False, _('No'))) - # list_name = forms.CharField( - # label=_('List Name'), - # required=False) - host_name = forms.CharField( - label=_('Domain host name'), - required=False) - # informational, not configurable - # fqdn_listname = forms.CharField( - # label=_('Fqdn listname'), - # required=False) + Set the general archive policy. + """ + archive_policy_choices = ( + ("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'), + help_text=_('Policy for archiving messages for this list'), + ) + + +class MessageAcceptanceForm(forms.Form): + """ + List messages acceptance settings. + """ + action_choices = ( + ("hold", _("Hold for moderator")), + ("reject", _("Reject (with notification)")), + ("discard", _("Discard (no notification)")), + ("accept", _("Accept")), + ("defer", _("Defer"))) + acceptable_aliases = forms.CharField( + widget=forms.Textarea(), + label=_("Acceptable aliases"), + required=False, + help_text=( + 'Alias names which qualify as explicit to or cc destination names ' + 'for this list. Alternate addresses that are acceptable when ' + '`require_explicit_destination\' is enabled. This option takes a ' + 'list of regular expressions, one per line, which is matched ' + 'against every recipient address in the message. The matching is ' + 'performed with Python\'s re.match() function, meaning they are ' + 'anchored to the start of the string.')) + administrivia = forms.BooleanField( + widget=forms.RadioSelect(choices=((True, _('Yes')), (False, _('No')))), + required=False, + label=_('Administrivia'), + help_text=( + 'Administrivia tests will check postings to see whether it\'s ' + 'really meant as an administrative request (like subscribe, ' + 'unsubscribe, etc), and will add it to the the administrative ' + 'requests queue, notifying the administrator of the new request, ' + 'in the process.')) + default_member_action = forms.ChoiceField( + widget=forms.RadioSelect(), + label=_('Default action to take when a member posts to the list:'), + error_messages={ + 'required': _("Please choose a default member action.")}, + required=True, + choices=action_choices, + help_text=( + 'Default action to take when a member posts to the list. ' + 'Hold -- This holds the message for approval by the list ' + 'moderators.' + 'Reject -- this automatically rejects the message by sending a ' + 'bounce notice to the post\'s author. The text of the bounce ' + 'notice can be configured by you. ' + 'Discard -- this simply discards the message, with no notice ' + 'sent to the post\'s author. ' + 'Accept --accepts any postings to the list by default. ' + 'Defer -- Defers any postings to the list by default. ')) + default_nonmember_action = forms.ChoiceField( + widget=forms.RadioSelect(), + label=_('Default action to take when a non-member posts to the' + 'list:'), + error_messages={ + 'required': _("Please choose a default non-member action.")}, + required=True, + choices=action_choices, + help_text=( + 'When a post from a non-member is received, the message\'s sender ' + 'is matched against the list of explicitly accepted, held, ' + 'rejected (bounced), and discarded addresses. ' + 'If no match is found, then this action is taken.')) + + +class DigestSettingsForm(forms.Form): + """ + List digest settings. + """ + digest_size_threshold = forms.DecimalField( + label=_('Digest size threshold'), + help_text=('How big in Kb should a digest be before it gets sent ' + 'out?')) + + +class AlterMessagesForm(forms.Form): + """ + Alter messages list settings. + """ + filter_content = forms.TypedChoiceField( + coerce=lambda x: x == 'True', + choices=((True, _('Yes')), (False, _('No'))), + widget=forms.RadioSelect, + required=False, + label=_('Filter content'), + help_text=( + 'Should Mailman filter the content of list traffic according to ' + 'the settings below?')) + collapse_alternatives = forms.TypedChoiceField( + coerce=lambda x: x == 'True', + choices=((True, _('Yes')), (False, _('No'))), + widget=forms.RadioSelect, + required=False, + label=_('Collapse alternatives'), + help_text=( + 'Should Mailman collapse multipart/alternative to its first part ' + 'content?')) + convert_html_to_plaintext = forms.TypedChoiceField( + coerce=lambda x: x == 'True', + choices=((True, _('Yes')), (False, _('No'))), + widget=forms.RadioSelect, + required=False, + label=_('Convert html to plaintext'), + help_text=( + 'Should Mailman convert text/html parts to plain text? This ' + 'conversion happens after MIME attachments have been stripped.')) + anonymous_list = forms.TypedChoiceField( + coerce=lambda x: x == 'True', + choices=((True, _('Yes')), (False, _('No'))), + widget=forms.RadioSelect, + required=False, + label=_('Anonymous list'), + help_text=( + 'Hide the sender of a message, replacing it with the list address ' + '(Removes From, Sender and Reply-To fields)')) include_rfc2369_headers = forms.TypedChoiceField( coerce=lambda x: x == 'True', choices=((True, _('Yes')), (False, _('No'))), @@ -223,25 +340,82 @@ 'recommended (and in fact, your ability to disable these headers ' 'may eventually go away).')) allow_list_posts = forms.TypedChoiceField( - choices=choices, + choices=((True, _('Yes')), (False, _('No'))), widget=forms.RadioSelect, label=_("Include the list post header"), help_text=_( "This can be set to no for announce lists that do not wish to " "include the List-Post header because posting to the list is " - "discouraged."), - ) - archive_policy_choices = ( - ("public", _("Public Archives")), - ("private", _("Private Archives")), - ("never", _("Do not archive this list")), - ) - archive_policy = forms.ChoiceField( - choices=archive_policy_choices, + "discouraged.")) + reply_to_address = forms.CharField( + label=_('Explicit reply-to address'), + required=False, + help_text=_( + 'This option allows admins to set an explicit Reply-to address. ' + 'It is only used if the reply-to is set to use an explicitly set ' + 'header')) + first_strip_reply_to = forms.TypedChoiceField( + coerce=lambda x: x == 'False', + choices=((True, _('Yes')), (False, _('No'))), widget=forms.RadioSelect, - label=_('Archive Policy'), - help_text=_('Policy for archiving messages for this list'), - ) + required=False, + help_text=_( + 'Should any existing Reply-To: header found in the original ' + 'message be stripped? If so, this will be done regardless of ' + 'whether an explict Reply-To: header is added by Mailman or not.')) + reply_goes_to_list = forms.ChoiceField( + label=_('Reply goes to list'), + widget=forms.Select(), + required=False, + error_messages={ + 'required': _("Please choose a reply-to action.")}, + choices=( + ("no_munging", _("No Munging")), + ("point_to_list", _("Reply goes to list")), + ("explicit_header", _("Explicit Reply-to header set"))), + help_text=( + 'Where are replies to list messages directed? No Munging is ' + 'strongly recommended for most mailing lists. \nThis option ' + 'controls what Mailman does to the Reply-To: header in messages ' + 'flowing through this mailing list. When set to No Munging, no ' + 'Reply-To: header is ' + 'added by Mailman, although if one is present in the original ' + 'message, it is not stripped. Setting this value to either Reply ' + 'to List or Explicit Reply causes Mailman to insert a specific ' + 'Reply-To: header in all messages, overriding the header in the ' + 'original message if necessary (Explicit Reply inserts the value ' + 'of reply_to_address). There are many reasons not to introduce or ' + 'override the Reply-To: header. One is that some posters depend ' + 'on their own Reply-To: settings to convey their valid return ' + 'address. Another is that modifying Reply-To: makes it much more ' + 'difficult to send private replies. See `Reply-To\' Munging ' + 'Considered Harmful for a general discussion of this issue. ' + 'See Reply-To Munging Considered Useful for a dissenting opinion. ' + 'Some mailing lists have restricted ' + 'posting privileges, with a parallel list devoted to discussions. ' + 'Examples are `patches\' or `checkin\' lists, where software ' + 'changes are posted by a revision control system, but discussion ' + 'about the changes occurs on a developers mailing list. To ' + 'support these types of mailing lists, select Explicit Reply and ' + 'set the Reply-To: address option to point to the parallel list.')) + posting_pipeline = forms.ChoiceField( + label=_('Pipeline'), + widget=forms.Select(), + required=False, + error_messages={ + 'required': _("Please choose a reply-to action.")}, + choices=( + ("default-owner-pipeline", _("default-owner-pipeline")), + ("default-posting-pipeline", _("default-posting-pipeline")), + ("virgin", _("virgin"))), + help_text=( + 'Type of pipeline you want to use for this mailing list')) + + +class ListAutomaticResponsesForm(forms.Form): + """ + List settings for automatic responses. + """ autorespond_choices = ( ("respond_and_continue", _("Respond and continue processing")), ("respond_and_discard", _("Respond and discard message")), @@ -290,213 +464,6 @@ 'or -request/-owner address from the same poster. Set to zero ' '(or negative) for no grace period (i.e. auto-respond to every ' 'message).')) - # This doesn't make sense as a configurable, so we're leaving it out - # bounces_address = forms.EmailField( - # label=_('Bounces Address'), - # required=False) - advertised = forms.TypedChoiceField( - coerce=lambda x: x == 'True', - choices=((True, _('Yes')), (False, _('No'))), - widget=forms.RadioSelect, - label=_('Advertise the existence of this list?'), - help_text=( - 'Choose whether to include this list on the list of all lists')) - filter_content = forms.TypedChoiceField( - coerce=lambda x: x == 'True', - choices=((True, _('Yes')), (False, _('No'))), - widget=forms.RadioSelect, - required=False, - label=_('Filter content'), - help_text=( - 'Should Mailman filter the content of list traffic according to ' - 'the settings below?')) - collapse_alternatives = forms.TypedChoiceField( - coerce=lambda x: x == 'True', - choices=((True, _('Yes')), (False, _('No'))), - widget=forms.RadioSelect, - required=False, - label=_('Collapse alternatives'), - help_text=( - 'Should Mailman collapse multipart/alternative to its first part ' - 'content?')) - convert_html_to_plaintext = forms.TypedChoiceField( - coerce=lambda x: x == 'True', - choices=((True, _('Yes')), (False, _('No'))), - widget=forms.RadioSelect, - required=False, - label=_('Convert html to plaintext'), - help_text=( - 'Should Mailman convert text/html parts to plain text? This ' - 'conversion happens after MIME attachments have been stripped.')) - action_choices = ( - ("hold", _("Hold for moderator")), - ("reject", _("Reject (with notification)")), - ("discard", _("Discard (no notification)")), - ("accept", _("Accept")), - ("defer", _("Defer"))) - default_member_action = forms.ChoiceField( - widget=forms.RadioSelect(), - label=_('Default action to take when a member posts to the list:'), - error_messages={ - 'required': _("Please choose a default member action.")}, - required=True, - choices=action_choices, - help_text=( - 'Default action to take when a member posts to the list. ' - 'Hold -- This holds the message for approval by the list ' - 'moderators.' - 'Reject -- this automatically rejects the message by sending a ' - 'bounce notice to the post\'s author. The text of the bounce ' - 'notice can be configured by you. ' - 'Discard -- this simply discards the message, with no notice ' - 'sent to the post\'s author. ' - 'Accept --accepts any postings to the list by default. ' - 'Defer -- Defers any postings to the list by default. ')) - default_nonmember_action = forms.ChoiceField( - widget=forms.RadioSelect(), - label=_('Default action to take when a non-member posts to the' - 'list:'), - error_messages={ - 'required': _("Please choose a default non-member action.")}, - required=True, - choices=action_choices, - help_text=( - 'When a post from a non-member is received, the message\'s sender ' - 'is matched against the list of explicitly accepted, held, ' - 'rejected (bounced), and discarded addresses. ' - 'If no match is found, then this action is taken.')) - description = forms.CharField( - label=_('Description'), - help_text=( - 'This description is used when the mailing list is listed with ' - 'other mailing lists, or in headers, and so forth. It should be ' - 'as succinct as you can get it, while still identifying what the ' - 'list is.'), - widget=forms.Textarea()) - digest_size_threshold = forms.DecimalField( - label=_('Digest size threshold'), - help_text=('How big in Kb should a digest be before it gets sent out?') - ) - # Informational - # digest_last_sent_at = forms.IntegerField( - # label=_('Digest last sent at'), - # error_messages={ - # 'invalid': _('Please provide an integer.')}, - # required=False) - first_strip_reply_to = forms.TypedChoiceField( - coerce=lambda x: x == 'False', - choices=((True, _('Yes')), (False, _('No'))), - widget=forms.RadioSelect, - required=False, - help_text=_( - 'Should any existing Reply-To: header found in the original ' - 'message be stripped? If so, this will be done regardless of ' - 'whether an explict Reply-To: header is added by Mailman or not.') - ) - generic_nonmember_action = forms.IntegerField( - label=_('Generic nonmember action'), - error_messages={ - 'invalid': _('Please provide an integer.') - } - ) - mail_host = forms.CharField( - label=_('Mail Host'), - error_messages={'required': _('Please a domain name'), - 'invalid': _('Please enter a valid domain name.')}, - required=True, - help_text=( - "The \"host_name\" is the preferred name for email to " - "'mailman-related addresses on this host, and generally should be " - "the mail host's exchanger address, if any. This setting can be " - "useful for selecting among alternative names of a host that " - "has multiple addresses.")) - # informational, not editable - # next_digest_number = forms.IntegerField( - # label=_('Next digest number'), - # error_messages={ - # 'invalid': _('Please provide an integer.'), - # }, - # required=False, - # ) - # no_reply_address = forms.EmailField( - # label=_('No reply address'), - # required=False, - # ) - posting_pipeline = forms.ChoiceField( - label=_('Pipeline'), - widget=forms.Select(), - required=False, - error_messages={ - 'required': _("Please choose a reply-to action.")}, - choices=( - ("default-owner-pipeline", _("default-owner-pipeline")), - ("default-posting-pipeline", _("default-posting-pipeline")), - ("virgin", _("virgin"))), - help_text=( - 'Type of pipeline you want to use for this mailing list') - - ) - # post_id = forms.IntegerField( - # label=_('Post ID'), - # error_messages={ - # 'invalid': _('Please provide an integer.'), - # }, - # required=False, - # ) - display_name = forms.CharField( - label=_('Display name'), - help_text=('Display name is the name shown in the web interface.') - ) - subject_prefix = forms.CharField( - label=_('Subject prefix'), - ) - reply_goes_to_list = forms.ChoiceField( - label=_('Reply goes to list'), - widget=forms.Select(), - required=False, - error_messages={ - 'required': _("Please choose a reply-to action.")}, - choices=( - ("no_munging", _("No Munging")), - ("point_to_list", _("Reply goes to list")), - ("explicit_header", _("Explicit Reply-to header set"))), - help_text=( - 'Where are replies to list messages directed? No Munging is ' - 'strongly recommended for most mailing lists. \nThis option ' - 'controls what Mailman does to the Reply-To: header in messages ' - 'flowing through this mailing list. When set to No Munging, no ' - 'Reply-To: header is ' - 'added by Mailman, although if one is present in the original ' - 'message, it is not stripped. Setting this value to either Reply ' - 'to List or Explicit Reply causes Mailman to insert a specific ' - 'Reply-To: header in all messages, overriding the header in the ' - 'original message if necessary (Explicit Reply inserts the value ' - 'of reply_to_address). There are many reasons not to introduce or ' - 'override the Reply-To: header. One is that some posters depend ' - 'on their own Reply-To: settings to convey their valid return ' - 'address. Another is that modifying Reply-To: makes it much more ' - 'difficult to send private replies. See `Reply-To\' Munging ' - 'Considered Harmful for a general discussion of this issue. ' - 'See Reply-To Munging Considered Useful for a dissenting opinion. ' - 'Some mailing lists have restricted ' - 'posting privileges, with a parallel list devoted to discussions. ' - 'Examples are `patches\' or `checkin\' lists, where software ' - 'changes are posted by a revision control system, but discussion ' - 'about the changes occurs on a developers mailing list. To ' - 'support these types of mailing lists, select Explicit Reply and ' - 'set the Reply-To: address option to point to the parallel list.')) - reply_to_address = forms.CharField( - label=_('Explicit reply-to address'), - required=False, - help_text=_( - 'This option allows admins to set an explicit Reply-to address. ' - 'It is only used if the reply-to is set to use an explicitly set ' - 'header'), - ) - # informational, not editable - # request_address = forms.EmailField( - # label=_('Request address'), - # required=False) send_welcome_message = forms.TypedChoiceField( coerce=lambda x: x == 'True', choices=((True, _('Yes')), (False, _('No'))), @@ -515,24 +482,8 @@ 'If a welcome message is to be sent to subscribers, you can ' 'specify a URI that gives the text of this message.'), ) - # tko - look this up - # scheme = forms.CharField( - # label=_('Scheme'), - # required=False) - acceptable_aliases = forms.CharField( - widget=forms.Textarea(), - label=_("Acceptable aliases"), - required=False, - help_text=( - 'Alias names which qualify as explicit to or cc destination names ' - 'for this list. Alternate addresses that are acceptable when ' - '`require_explicit_destination\' is enabled. This option takes a ' - 'list of regular expressions, one per line, which is matched ' - 'against every recipient address in the message. The matching is ' - 'performed with Python\'s re.match() function, meaning they are ' - 'anchored to the start of the string.')) admin_immed_notify = forms.BooleanField( - widget=forms.RadioSelect(choices=choices), + widget=forms.RadioSelect(choices=((True, _('Yes')), (False, _('No')))), required=False, label=_('Admin immed notify'), help_text=( @@ -544,137 +495,70 @@ 'Setting this option causes notices to be sent immediately on the ' 'arrival of new requests as well. ')) admin_notify_mchanges = forms.BooleanField( - widget=forms.RadioSelect(choices=choices), + widget=forms.RadioSelect(choices=((True, _('Yes')), (False, _('No')))), required=False, label=_('Notify admin of membership changes'), help_text=( 'Should administrator get notices of subscribes and unsubscribes?' )) - administrivia = forms.BooleanField( - widget=forms.RadioSelect(choices=choices), - required=False, - label=_('Administrivia'), - help_text=( - 'Administrivia tests will check postings to see whether it\'s ' - 'really meant as an administrative request (like subscribe, ' - 'unsubscribe, etc), and will add it to the the administrative ' - 'requests queue, notifying the administrator of the new request, ' - 'in the process.')) - anonymous_list = forms.TypedChoiceField( + + +class ListIdentityForm(forms.Form): + """ + List identity settings. + """ + advertised = forms.TypedChoiceField( coerce=lambda x: x == 'True', choices=((True, _('Yes')), (False, _('No'))), widget=forms.RadioSelect, - required=False, - label=_('Anonymous list'), + label=_('Show list on index page'), help_text=( - 'Hide the sender of a message, replacing it with the list address ' - '(Removes From, Sender and Reply-To fields)')) - # Informational field, not needed. - # created_at = forms.IntegerField( - # label=_('Created at'), - # widget=forms.HiddenInput(), - # required=False) - # join_address = forms.EmailField( - # label=_('Join address'), - # required=False) - # last_post_at = forms.IntegerField( - # label=_('Last post at'), - # required=False) - # leave_address = forms.EmailField( - # label=_('Leave address'), - # required=False) - # owner_address = forms.EmailField( - # label=_('Owner Address'), - # required=False) - # posting_address = forms.EmailField( - # label=_('Posting Address'), - # required=False) + 'Choose whether to include this list on the list of all lists')) + description = forms.CharField( + label=_('Description'), + help_text=( + 'This description is used when the mailing list is listed with ' + 'other mailing lists, or in headers, and so forth. It should be ' + 'as succinct as you can get it, while still identifying what the ' + 'list is.'), + widget=forms.Textarea()) + mail_host = forms.CharField( + label=_('Mail Host'), + error_messages={'required': _('Please a domain name'), + 'invalid': _('Please enter a valid domain name.')}, + required=True, + help_text=( + "The \"host_name\" is the preferred name for email to " + "'mailman-related addresses on this host, and generally should be " + "the mail host's exchanger address, if any. This setting can be " + "useful for selecting among alternative names of a host that " + "has multiple addresses.")) + display_name = forms.CharField( + label=_('Display name'), + help_text=('Display name is the name shown in the web interface.') + ) + subject_prefix = forms.CharField( + label=_('Subject prefix'), + ) - # Descriptions used in the Settings Overview Page - section_descriptions = { - "List Identity": _("Basic identity settings for the list"), - "Automatic Responses": _("All options for Autoreply"), - "Alter Messages": _("Settings that modify member messages"), - "Digest": _("Digest-related options"), - "Message Acceptance": _("Options related to accepting messages"), - "Archives": _("Options related to archiving messages")} - def clean_acceptable_aliases(self): - data = self.cleaned_data['acceptable_aliases'] - return data.splitlines() +SUBSCRIPTION_POLICY_CHOICES = ( + ('', _('Please Choose')), + ('open', _('Open')), + ('confirm', _('Confirm')), + ('moderate', _('Moderate')), + ('confirm_then_moderate', _('Confirm, then moderate')), +) - def __init__(self, visible_section, visible_option, *args, **kwargs): - super(ListSettings, self).__init__(*args, **kwargs) - # if settings: - # raise Exception(settings) # debug - if visible_option: - options = [] - for option in self.layout: - options += option[1:] - if visible_option in options: - self.layout = [["", visible_option]] - if visible_section: - sections = [] - for section in self.layout: - sections.append(section[0]) - if visible_section in sections: - for section in self.layout: - if section[0] == visible_section: - self.layout = [section] - try: - if data: - for section in self.layout: - for option in section[1:]: - self.fields[option].initial = settings[option] - except: - pass # empty form - def truncate(self): - """ - truncates the form to have only those fields which are in self.layout - """ - # delete form.fields which are not in the layout - used_options = [] - for section in self.layout: - used_options += section[1:] - - for key in self.fields.keys(): - if not(key in used_options): - del self.fields[key] - - class Meta: - - """Class to handle the automatic insertion of fieldsets and divs. - - To use it: add a list for each wished fieldset. The first item in - the list should be the wished name of the fieldset, the following - the fields that should be included in the fieldset. - """ - # just a really temporary layout to see that it works. -- Anna - layout = [ - ["List Identity", "display_name", "mail_host", "description", - "advertised", "subject_prefix"], - ["Automatic Responses", "autorespond_owner", - "autoresponse_owner_text", "autorespond_postings", - "autoresponse_postings_text", "autorespond_requests", - "autoresponse_request_text", "autoresponse_grace_period", - "send_welcome_message", - "welcome_message_uri", - "admin_immed_notify", - "admin_notify_mchanges"], - ["Alter Messages", "filter_content", "collapse_alternatives", - "convert_html_to_plaintext", "anonymous_list", - "include_rfc2369_headers", - "allow_list_posts", - "reply_goes_to_list", - "reply_to_address", - "first_strip_reply_to", - "posting_pipeline"], - ["Digest", "digest_size_threshold"], - ["Message Acceptance", "acceptable_aliases", "administrivia", - "default_nonmember_action", "default_member_action"], - ["Archives", "archive_policy"], - ] +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): diff --git a/src/postorius/static/postorius/css/style.css b/src/postorius/static/postorius/css/style.css index af1a86f..40b34de 100755 --- a/src/postorius/static/postorius/css/style.css +++ b/src/postorius/static/postorius/css/style.css @@ -192,6 +192,12 @@ .btn { border-radius: 2px; } +.control-group textarea { + width: 80%; + max-width: 400px; + height: 100px; +} + /* tables */ .table .mm_action { diff --git a/src/postorius/templates/postorius/lists/held_messages.html b/src/postorius/templates/postorius/lists/held_messages.html index bde56a2..7f2014d 100644 --- a/src/postorius/templates/postorius/lists/held_messages.html +++ b/src/postorius/templates/postorius/lists/held_messages.html @@ -13,49 +13,57 @@ {% block main %} {% list_nav 'list_held_messages' "Held Messages" %} - - - - - - - - - - - - {% for msg in list.held %} - - - - - + {% if list.held|length > 0 %} - + + {% endfor %} + +
{% trans 'Subject' %}{% trans 'Sender' %}{% trans 'Reason' %}{% trans 'Hold Date' %} 
{{ msg.subject }}{{ msg.sender }}{{ msg.reason }}{{ msg.hold_date }} - {% trans 'View' %} + + + + + + + + + + + + {% for msg in list.held %} + + + + + - {% trans 'Accept' %} - {% trans 'Defer' %} - {% trans 'Reject' %} - {% trans 'Discard' %} - - - - {% endfor %} - -
{% trans 'Subject' %}{% trans 'Sender' %}{% trans 'Reason' %}{% trans 'Hold Date' %} 
{{ msg.subject }}{{ msg.sender }}{{ msg.reason }}{{ msg.hold_date }} + {% trans 'View' %} + + {% trans 'Accept' %} + {% trans 'Defer' %} + {% trans 'Reject' %} + {% trans 'Discard' %} + + + - -
+
+ {% else %} + +

{% trans 'There are currently no held messages.' %}

+ + {% endif %} {% endblock %} diff --git a/src/postorius/templates/postorius/lists/index.html b/src/postorius/templates/postorius/lists/index.html index 63a692a..01efa94 100644 --- a/src/postorius/templates/postorius/lists/index.html +++ b/src/postorius/templates/postorius/lists/index.html @@ -36,7 +36,7 @@ {% for list in lists %} - {{ list.display_name }}{% if not list.settings.advertised %} (private*){% endif %} + {{ list.display_name }}{% if not list.settings.advertised %} ({% trans 'unadvertised' %}*){% endif %} {{ list.fqdn_listname }} {{ list.settings.description }} @@ -46,7 +46,7 @@ {% if user.is_superuser %} - * Private lists can only be seen by admins. + * {% trans 'Only admins see unadvertised lists in the list index.' %} {% endif %} {% else %} diff --git a/src/postorius/templates/postorius/lists/settings.html b/src/postorius/templates/postorius/lists/settings.html index 552da05..a139feb 100644 --- a/src/postorius/templates/postorius/lists/settings.html +++ b/src/postorius/templates/postorius/lists/settings.html @@ -12,28 +12,39 @@ {% if message %}

{{ message }}

{% endif %} {% list_nav 'list_settings' 'Settings' %} - {% if visible_section %} +
{% csrf_token %} + + {% for field in form %} - - {% csrf_token %} - {% for field in form %} - + {% if field.errors %} +
{{ field.errors }}
+ {% endif %} + +
+ +
+ {{ field.label_tag }} + [{% trans "?" %}{{ field.help_text }}] +
+ +
+ {{ field }} +
+
+ {% endfor %} - - -
- {{ field.errors }} - {{ field.label_tag }}
- [{% trans "More info" %}{{ field.help_text }} - ] -
{{ field }}
- -
- {% endif %} + +
+ + + +
+ + {% endblock %} diff --git a/src/postorius/templates/postorius/lists/settings_legacy.html b/src/postorius/templates/postorius/lists/settings_legacy.html new file mode 100644 index 0000000..8836554 --- /dev/null +++ b/src/postorius/templates/postorius/lists/settings_legacy.html @@ -0,0 +1,34 @@ +{% extends postorius_base_template %} +{% load url from future %} +{% load i18n %} +{% load nav_helpers %} + +{% block main %} + {% if message %}

{{ message }}

{% endif %} + {% list_nav 'list_settings' 'Settings' %} + + + {% if visible_section %} + + + {% csrf_token %} + {% for field in form %} + + {% endfor %} + + +
+ {{ field.errors }} + {{ field.label_tag }}
+ [{% trans "More info" %}{{ field.help_text }} + ] +
{{ field }}
+ +
+ {% endif %} + +{% endblock %} diff --git a/src/postorius/templates/postorius/lists/subscription_requests.html b/src/postorius/templates/postorius/lists/subscription_requests.html new file mode 100644 index 0000000..cbb81a2 --- /dev/null +++ b/src/postorius/templates/postorius/lists/subscription_requests.html @@ -0,0 +1,41 @@ +{% extends postorius_base_template %} +{% load url from future %} +{% load i18n %} +{% load nav_helpers %} + +{% block body_class %}list_summary{% endblock %} + +{% block main %} + {% list_nav 'list_subscription_requests' "Subscription Requests" %} + + {% if list.requests|length > 0 %} + + + + + + + + + + {% for request in list.requests %} + + + + + + {% endfor %} + +
{% trans 'E-Mail Address' %} 
{{ request.email }} + {% trans 'Accept' %} + {% trans 'Reject' %} + {% trans 'Discard' %} +
+ + {% else %} + +

{% trans 'There are currently no subscription requests for this list.' %}

+ + {% endif %} + +{% endblock %} diff --git a/src/postorius/templates/postorius/lists/summary.html b/src/postorius/templates/postorius/lists/summary.html index fdf335d..253bc44 100644 --- a/src/postorius/templates/postorius/lists/summary.html +++ b/src/postorius/templates/postorius/lists/summary.html @@ -14,32 +14,50 @@ {% if user.is_superuser or user.is_list_owner or user.is_list_moderator %} {% include 'postorius/menu/list_nav.html' %} {% endif %} -

{{list.display_name}}

+
+ +

{{list.display_name}} - {{ list.fqdn_listname }}

+

{{list.settings.description }}

-

{% trans 'Description' %}

-

{{list.settings.description }}

+ {% if hyperkitty_url %} +

{% trans 'Archived messages' %}

+ {% blocktrans %} + To see the prior postings to this list, visit + the archives. + {% endblocktrans %} + {% endif %} - {% if hyperkitty_url %} -

{% trans 'Archived messages' %}

- {% blocktrans %} - To see the prior postings to this list, visit - the archives. - {% endblocktrans %} - {% endif %} +
+
{% trans 'To contact the list owners, use the following email address:' %}
+
{{ list.settings.owner_address }}
+
+ +
+ -

{% trans 'Subscription' %}

{% if user.is_authenticated %} - {% if userSubscribed %} - {% trans "Unsubscribe" %} + + {% if userSubscribed %} + + {% trans "Unsubscribe" %} + + {% else %} + +

{% trans 'Subscribe to this list' %}

+ +
{% csrf_token %} + {{subscribe_form.as_p}} + +
+ + {% endif %} + {% else %} -
{% csrf_token %} - {{subscribe_form.as_p}} - -
- {% endif %} - {% else %} -

{% trans "To subscribe to or unsubscribe from this list you have to be logged in." %}

+ +

{% trans "You have to log in to subscribe to this list." %}

{% trans "Log In" %}

+ {% endif %} + {% endblock %} diff --git a/src/postorius/templates/postorius/menu/list_nav.html b/src/postorius/templates/postorius/menu/list_nav.html index 70e9360..98900a6 100644 --- a/src/postorius/templates/postorius/menu/list_nav.html +++ b/src/postorius/templates/postorius/menu/list_nav.html @@ -10,6 +10,9 @@
  • {% trans "Members" %}
  • {% endif %} {% if user.is_superuser or user.is_list_owner or user.is_list_moderator %} +
  • {% trans "Subscription Requests" %}
  • + {% endif %} + {% if user.is_superuser or user.is_list_owner or user.is_list_moderator %}
  • {% trans "Held Messages" %}
  • {% endif %} {% if user.is_superuser or user.is_list_owner %} diff --git a/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml b/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml index e9f9135..5c9844d 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,13 +25,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -43,13 +44,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -65,7 +67,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] location: ['http://localhost:9001/3.0/lists/test_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -78,15 +80,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "test_list@example.com", "list_id": - "test_list.example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_name": "test_list", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1, "display_name": "Test_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": + "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", + "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -98,12 +99,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\"", - "prototype": false, "mail-archive": true, "mhonarc": false}'} + body: {string: !!python/unicode '{"mhonarc": false, "http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\"", + "prototype": false, "mail-archive": true}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -115,15 +116,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "test_list@example.com", "list_id": - "test_list.example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_name": "test_list", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1, "display_name": "Test_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": + "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", + "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -138,7 +138,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml index 9a2ffd2..61f7da6 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,13 +25,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -43,13 +44,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -65,7 +67,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -78,19 +80,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&list_id=foo.example.com&role=owner + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -102,12 +103,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] - location: ['http://localhost:9001/3.0/members/65666166344199916015948757016727609115'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + location: ['http://localhost:9001/3.0/members/329671489027490421265386582601272028519'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&list_id=foo.example.com&role=moderator + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -119,8 +120,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] - location: ['http://localhost:9001/3.0/members/142734914141373676799912641898971185828'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + location: ['http://localhost:9001/3.0/members/196553294715842416766462573342664802582'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -135,7 +136,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -152,7 +153,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -164,13 +165,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -182,13 +184,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -204,7 +207,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -217,19 +220,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&list_id=foo.example.com&role=owner + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -241,12 +243,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] - location: ['http://localhost:9001/3.0/members/146478159952862640555572319802110037529'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + location: ['http://localhost:9001/3.0/members/273159179840151621454458997067388833786'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&list_id=foo.example.com&role=moderator + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -258,8 +260,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] - location: ['http://localhost:9001/3.0/members/300345844286885579524106623093994765189'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + location: ['http://localhost:9001/3.0/members/331227949447350025956816628996255206393'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -274,7 +276,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -291,7 +293,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -303,13 +305,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -321,13 +324,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -343,7 +347,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -356,19 +360,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&list_id=foo.example.com&role=owner + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -380,12 +383,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] - location: ['http://localhost:9001/3.0/members/333804327984641227543735764681736417610'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + location: ['http://localhost:9001/3.0/members/299024060552066861675391395432566914375'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&list_id=foo.example.com&role=moderator + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -397,8 +400,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] - location: ['http://localhost:9001/3.0/members/193153637813201025305722262172721795279'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + location: ['http://localhost:9001/3.0/members/135784022531765933381966377047581383248'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -413,7 +416,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -430,7 +433,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -442,13 +445,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -460,13 +464,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -482,7 +487,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -495,19 +500,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&list_id=foo.example.com&role=owner + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -519,12 +523,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] - location: ['http://localhost:9001/3.0/members/326084107676518818095650670971849152636'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + location: ['http://localhost:9001/3.0/members/159126608472498677387861696412130511419'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&list_id=foo.example.com&role=moderator + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -536,8 +540,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] - location: ['http://localhost:9001/3.0/members/258304038484621747948113203888404536161'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + location: ['http://localhost:9001/3.0/members/259951785367547693411594524461957027558'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -549,15 +553,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -570,11 +573,11 @@ uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -586,16 +589,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"4ed6be8ec16e2102e963534eb944a8708b16a05e\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/326084107676518818095650670971849152636", - "email": "owner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/117102017827318954078289964069449293796", - "role": "owner", "http_etag": "\"3abaf9da7ad18416685dce89e0b8e18be05ecd41\"", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "member_id": - 326084107676518818095650670971849152636}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"b0f031240d12c8b4ea034d1415307ce30966dbeb\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", + "list_id": "foo.example.com", "http_etag": "\"6a7190aa0efe0ad862adf5f54d0db421a5f10480\"", + "member_id": 159126608472498677387861696412130511419, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", + "self_link": "http://localhost:9001/3.0/members/159126608472498677387861696412130511419"}], + "start": 0}'} headers: - content-length: ['566'] + content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -607,16 +611,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"66af03650198a5f13672fbc182ea7234647d1f1d\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/258304038484621747948113203888404536161", - "email": "moderator@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/313429703557169445575348239981723434246", - "role": "moderator", "http_etag": "\"762fab231ab86f1893701ceed01e36aa92827b69\"", - "address": "http://localhost:9001/3.0/addresses/moderator@example.com", "member_id": - 258304038484621747948113203888404536161}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"e9da2125c80f8192000fc5372434c862ba383aa6\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", + "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", + "list_id": "foo.example.com", "http_etag": "\"8a881fd76841b8740ba2338d9e9b40147f3673c2\"", + "member_id": 259951785367547693411594524461957027558, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", + "self_link": "http://localhost:9001/3.0/members/259951785367547693411594524461957027558"}], + "start": 0}'} headers: - content-length: ['578'] + content-length: ['577'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -628,15 +633,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -648,16 +652,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"4ed6be8ec16e2102e963534eb944a8708b16a05e\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/326084107676518818095650670971849152636", - "email": "owner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/117102017827318954078289964069449293796", - "role": "owner", "http_etag": "\"3abaf9da7ad18416685dce89e0b8e18be05ecd41\"", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "member_id": - 326084107676518818095650670971849152636}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"b0f031240d12c8b4ea034d1415307ce30966dbeb\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", + "list_id": "foo.example.com", "http_etag": "\"6a7190aa0efe0ad862adf5f54d0db421a5f10480\"", + "member_id": 159126608472498677387861696412130511419, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", + "self_link": "http://localhost:9001/3.0/members/159126608472498677387861696412130511419"}], + "start": 0}'} headers: - content-length: ['566'] + content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -672,7 +677,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:44 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -689,7 +694,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:45 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -701,13 +706,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:45 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -719,13 +725,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:45 GMT'] + date: ['Fri, 17 Apr 2015 21:06:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -741,7 +748,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:45 GMT'] + date: ['Fri, 17 Apr 2015 21:06:35 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -754,19 +761,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:45 GMT'] + date: ['Fri, 17 Apr 2015 21:06:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&list_id=foo.example.com&role=owner + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -778,12 +784,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:45 GMT'] - location: ['http://localhost:9001/3.0/members/33048892732221464402686396653921417791'] + date: ['Fri, 17 Apr 2015 21:06:35 GMT'] + location: ['http://localhost:9001/3.0/members/312239528095316624976791046185857013969'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&list_id=foo.example.com&role=moderator + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -795,8 +801,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:45 GMT'] - location: ['http://localhost:9001/3.0/members/303945703475387901708938435045952054401'] + date: ['Fri, 17 Apr 2015 21:06:35 GMT'] + location: ['http://localhost:9001/3.0/members/7648356180096890742121894934671798426'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -808,15 +814,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:45 GMT'] + date: ['Fri, 17 Apr 2015 21:06:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -829,11 +834,11 @@ uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:45 GMT'] + date: ['Fri, 17 Apr 2015 21:06:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -848,7 +853,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml index 5569ce2..829a8fb 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml @@ -8,15 +8,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -29,11 +28,11 @@ uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -45,16 +44,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"51d78cb00e18a60461749d1207f2707594ce1a6d\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/65666166344199916015948757016727609115", - "email": "owner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/117102017827318954078289964069449293796", - "role": "owner", "http_etag": "\"432b0cb405562590d58f047540c7527fb868ab68\"", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "member_id": - 65666166344199916015948757016727609115}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"97f8e274cb18d9e67c7519373aeb3007d0cbfb7e\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", + "list_id": "foo.example.com", "http_etag": "\"f3f5f44200fe8710a7f16f0d4d17f8b065ed8a73\"", + "member_id": 329671489027490421265386582601272028519, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", + "self_link": "http://localhost:9001/3.0/members/329671489027490421265386582601272028519"}], + "start": 0}'} headers: - content-length: ['564'] + content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -66,16 +66,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"c59397427b076a99f54451fb8426c485f0197621\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/142734914141373676799912641898971185828", - "email": "moderator@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/313429703557169445575348239981723434246", - "role": "moderator", "http_etag": "\"fc87fe575147375a29f2e51b16d7cd778ff9b6d4\"", - "address": "http://localhost:9001/3.0/addresses/moderator@example.com", "member_id": - 142734914141373676799912641898971185828}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"8dc83a6a5bc90e582d6fe2430de9711d4520e469\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", + "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", + "list_id": "foo.example.com", "http_etag": "\"f05e6ac32f4e64d3b9284df949fe9815287e555b\"", + "member_id": 196553294715842416766462573342664802582, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", + "self_link": "http://localhost:9001/3.0/members/196553294715842416766462573342664802582"}], + "start": 0}'} headers: - content-length: ['578'] + content-length: ['577'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -87,15 +88,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -107,16 +107,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"51d78cb00e18a60461749d1207f2707594ce1a6d\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/65666166344199916015948757016727609115", - "email": "owner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/117102017827318954078289964069449293796", - "role": "owner", "http_etag": "\"432b0cb405562590d58f047540c7527fb868ab68\"", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "member_id": - 65666166344199916015948757016727609115}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"97f8e274cb18d9e67c7519373aeb3007d0cbfb7e\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", + "list_id": "foo.example.com", "http_etag": "\"f3f5f44200fe8710a7f16f0d4d17f8b065ed8a73\"", + "member_id": 329671489027490421265386582601272028519, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", + "self_link": "http://localhost:9001/3.0/members/329671489027490421265386582601272028519"}], + "start": 0}'} headers: - content-length: ['564'] + content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -128,15 +129,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -149,11 +149,11 @@ uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -165,16 +165,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"0cb4d7b03c6e1af1a9ea0488f225e1eaee21d06f\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/146478159952862640555572319802110037529", - "email": "owner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/117102017827318954078289964069449293796", - "role": "owner", "http_etag": "\"85a930c254b3f42b5cf86c653442fea56835dcec\"", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "member_id": - 146478159952862640555572319802110037529}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"c30123ccd446c01058bdb1e04209dbe9d6dea00a\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", + "list_id": "foo.example.com", "http_etag": "\"d16014a89b461fc3edb2511553a8e18c1c50484b\"", + "member_id": 273159179840151621454458997067388833786, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", + "self_link": "http://localhost:9001/3.0/members/273159179840151621454458997067388833786"}], + "start": 0}'} headers: - content-length: ['566'] + content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -186,16 +187,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"544213e84cea14e55fa5e4b5d7283acb2a0fa1f8\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/300345844286885579524106623093994765189", - "email": "moderator@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/313429703557169445575348239981723434246", - "role": "moderator", "http_etag": "\"a0565c2e2754fb1c2bd5cef276c64d818485f1a9\"", - "address": "http://localhost:9001/3.0/addresses/moderator@example.com", "member_id": - 300345844286885579524106623093994765189}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"7bf369f9e60c0fc2bda5a94f81d76608d83ec31c\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", + "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", + "list_id": "foo.example.com", "http_etag": "\"317149b2b5f0ea3a65deb5f4ff7f6583c0fe7fa6\"", + "member_id": 331227949447350025956816628996255206393, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", + "self_link": "http://localhost:9001/3.0/members/331227949447350025956816628996255206393"}], + "start": 0}'} headers: - content-length: ['578'] + content-length: ['577'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -207,16 +209,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"0cb4d7b03c6e1af1a9ea0488f225e1eaee21d06f\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/146478159952862640555572319802110037529", - "email": "owner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/117102017827318954078289964069449293796", - "role": "owner", "http_etag": "\"85a930c254b3f42b5cf86c653442fea56835dcec\"", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "member_id": - 146478159952862640555572319802110037529}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"c30123ccd446c01058bdb1e04209dbe9d6dea00a\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", + "list_id": "foo.example.com", "http_etag": "\"d16014a89b461fc3edb2511553a8e18c1c50484b\"", + "member_id": 273159179840151621454458997067388833786, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", + "self_link": "http://localhost:9001/3.0/members/273159179840151621454458997067388833786"}], + "start": 0}'} headers: - content-length: ['566'] + content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -228,16 +231,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"544213e84cea14e55fa5e4b5d7283acb2a0fa1f8\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/300345844286885579524106623093994765189", - "email": "moderator@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/313429703557169445575348239981723434246", - "role": "moderator", "http_etag": "\"a0565c2e2754fb1c2bd5cef276c64d818485f1a9\"", - "address": "http://localhost:9001/3.0/addresses/moderator@example.com", "member_id": - 300345844286885579524106623093994765189}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"7bf369f9e60c0fc2bda5a94f81d76608d83ec31c\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", + "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", + "list_id": "foo.example.com", "http_etag": "\"317149b2b5f0ea3a65deb5f4ff7f6583c0fe7fa6\"", + "member_id": 331227949447350025956816628996255206393, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", + "self_link": "http://localhost:9001/3.0/members/331227949447350025956816628996255206393"}], + "start": 0}'} headers: - content-length: ['578'] + content-length: ['577'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:42 GMT'] + date: ['Fri, 17 Apr 2015 21:06:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -249,15 +253,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -270,11 +273,11 @@ uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -286,16 +289,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"bae7530d8cf648d529d508d3c46be38477c8d3ad\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/333804327984641227543735764681736417610", - "email": "owner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/117102017827318954078289964069449293796", - "role": "owner", "http_etag": "\"ec0178c2e8d6fb0133a819a2a064d3da9ba36c61\"", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "member_id": - 333804327984641227543735764681736417610}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"26bd6686cfe7a4f8557f9042362c7466fa627240\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", + "list_id": "foo.example.com", "http_etag": "\"ad9414d29c784cb7960ffd5ec0c4809495e779ff\"", + "member_id": 299024060552066861675391395432566914375, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", + "self_link": "http://localhost:9001/3.0/members/299024060552066861675391395432566914375"}], + "start": 0}'} headers: - content-length: ['566'] + content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -307,16 +311,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"6dcb366c09097b00549bde66eeb52f0ce1a4ec22\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/193153637813201025305722262172721795279", - "email": "moderator@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/313429703557169445575348239981723434246", - "role": "moderator", "http_etag": "\"28617c5a79940598bbb23f35c3f5e46ec6eb6d46\"", - "address": "http://localhost:9001/3.0/addresses/moderator@example.com", "member_id": - 193153637813201025305722262172721795279}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"f522516f993a5825937a080d7d5581016a152ab8\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", + "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", + "list_id": "foo.example.com", "http_etag": "\"ea4b59149fb520cd9c27c85626d11e1e524a8c2b\"", + "member_id": 135784022531765933381966377047581383248, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", + "self_link": "http://localhost:9001/3.0/members/135784022531765933381966377047581383248"}], + "start": 0}'} headers: - content-length: ['578'] + content-length: ['577'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -328,16 +333,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"bae7530d8cf648d529d508d3c46be38477c8d3ad\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/333804327984641227543735764681736417610", - "email": "owner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/117102017827318954078289964069449293796", - "role": "owner", "http_etag": "\"ec0178c2e8d6fb0133a819a2a064d3da9ba36c61\"", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "member_id": - 333804327984641227543735764681736417610}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"26bd6686cfe7a4f8557f9042362c7466fa627240\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", + "list_id": "foo.example.com", "http_etag": "\"ad9414d29c784cb7960ffd5ec0c4809495e779ff\"", + "member_id": 299024060552066861675391395432566914375, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", + "self_link": "http://localhost:9001/3.0/members/299024060552066861675391395432566914375"}], + "start": 0}'} headers: - content-length: ['566'] + content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -349,16 +355,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"6dcb366c09097b00549bde66eeb52f0ce1a4ec22\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/193153637813201025305722262172721795279", - "email": "moderator@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/313429703557169445575348239981723434246", - "role": "moderator", "http_etag": "\"28617c5a79940598bbb23f35c3f5e46ec6eb6d46\"", - "address": "http://localhost:9001/3.0/addresses/moderator@example.com", "member_id": - 193153637813201025305722262172721795279}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"f522516f993a5825937a080d7d5581016a152ab8\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", + "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", + "list_id": "foo.example.com", "http_etag": "\"ea4b59149fb520cd9c27c85626d11e1e524a8c2b\"", + "member_id": 135784022531765933381966377047581383248, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", + "self_link": "http://localhost:9001/3.0/members/135784022531765933381966377047581383248"}], + "start": 0}'} headers: - content-length: ['578'] + content-length: ['577'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:43 GMT'] + date: ['Fri, 17 Apr 2015 21:06:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options.yaml index 48ff9a6..1966385 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options.yaml @@ -12,7 +12,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:26 GMT'] location: ['http://localhost:9001/3.0/domains/example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -25,13 +25,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:26 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -47,7 +48,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:26 GMT'] location: ['http://localhost:9001/3.0/lists/test_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -60,15 +61,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "test_list@example.com", "list_id": - "test_list.example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_name": "test_list", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1, "display_name": "Test_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": + "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", + "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:26 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -80,12 +80,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", - "prototype": false, "mail-archive": true, "mhonarc": true}'} + body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", + "prototype": false, "mail-archive": true}'} headers: content-length: ['120'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:26 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -97,15 +97,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "test_list@example.com", "list_id": - "test_list.example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_name": "test_list", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1, "display_name": "Test_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": + "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", + "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -120,7 +119,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -137,7 +136,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -149,13 +148,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -167,13 +167,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -189,7 +190,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] location: ['http://localhost:9001/3.0/lists/test_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -202,15 +203,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "test_list@example.com", "list_id": - "test_list.example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_name": "test_list", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1, "display_name": "Test_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": + "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", + "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -222,12 +222,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", - "prototype": false, "mail-archive": true, "mhonarc": true}'} + body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", + "prototype": false, "mail-archive": true}'} headers: content-length: ['120'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -239,15 +239,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "test_list@example.com", "list_id": - "test_list.example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_name": "test_list", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1, "display_name": "Test_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": + "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", + "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -262,7 +261,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:38 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -279,7 +278,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -291,13 +290,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -309,13 +309,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -331,7 +332,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] location: ['http://localhost:9001/3.0/lists/test_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -344,15 +345,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "test_list@example.com", "list_id": - "test_list.example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_name": "test_list", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1, "display_name": "Test_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": + "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", + "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -364,12 +364,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", - "prototype": false, "mail-archive": true, "mhonarc": true}'} + body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", + "prototype": false, "mail-archive": true}'} headers: content-length: ['120'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -384,7 +384,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_disable_archiver.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_disable_archiver.yaml index 6dc1011..665d386 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_disable_archiver.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_disable_archiver.yaml @@ -8,15 +8,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "test_list@example.com", "list_id": - "test_list.example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_name": "test_list", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1, "display_name": "Test_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": + "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", + "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:27 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -28,16 +27,16 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", - "prototype": false, "mail-archive": true, "mhonarc": true}'} + body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", + "prototype": false, "mail-archive": true}'} headers: content-length: ['120'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: mhonarc=True&mail-archive=True&prototype=True + body: prototype=True&mhonarc=True&mail-archive=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -49,11 +48,11 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: - body: mhonarc=True&mail-archive=False&prototype=True + body: prototype=True&mhonarc=True&mail-archive=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -65,7 +64,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -77,12 +76,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\"", - "prototype": false, "mail-archive": false, "mhonarc": true}'} + body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\"", + "prototype": false, "mail-archive": false}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -94,12 +93,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\"", - "prototype": false, "mail-archive": false, "mhonarc": true}'} + body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\"", + "prototype": false, "mail-archive": false}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_enable_archiver.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_enable_archiver.yaml index 5d4b0ad..aa0afe4 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_enable_archiver.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_enable_archiver.yaml @@ -8,15 +8,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "test_list@example.com", "list_id": - "test_list.example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_name": "test_list", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1, "display_name": "Test_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": + "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", + "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -28,16 +27,16 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\"", - "prototype": false, "mail-archive": false, "mhonarc": true}'} + body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\"", + "prototype": false, "mail-archive": false}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: mhonarc=True&mail-archive=True&prototype=False + body: prototype=False&mhonarc=True&mail-archive=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -49,11 +48,11 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: - body: mhonarc=False&mail-archive=True&prototype=False + body: prototype=False&mhonarc=False&mail-archive=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -65,7 +64,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -77,12 +76,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\"", - "prototype": false, "mail-archive": true, "mhonarc": false}'} + body: {string: !!python/unicode '{"mhonarc": false, "http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\"", + "prototype": false, "mail-archive": true}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -94,12 +93,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\"", - "prototype": false, "mail-archive": true, "mhonarc": false}'} + body: {string: !!python/unicode '{"mhonarc": false, "http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\"", + "prototype": false, "mail-archive": true}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:39 GMT'] + date: ['Fri, 17 Apr 2015 21:06:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml index 8ae0e42..b827f00 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,13 +25,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,14 +45,14 @@ uri: http://localhost:9001/3.0/domains response: body: {string: !!python/unicode '{"http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", - "entries": [{"self_link": "http://localhost:9001/3.0/domains/example.com", + "total_size": 1, "entries": [{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_host": "example.com"}], - "start": 0, "total_size": 1}'} + "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": + "example.com"}], "start": 0}'} headers: content-length: ['338'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -63,13 +64,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -81,13 +83,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,13 +102,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -121,7 +125,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] location: ['http://localhost:9001/3.0/lists/a_new_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -134,19 +138,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "a_new_list@example.com", "list_id": - "a_new_list.example.com", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\"", - "list_name": "a_new_list", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", - "volume": 1, "display_name": "A_new_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "a_new_list", "volume": 1, "list_id": + "a_new_list.example.com", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", + "fqdn_listname": "a_new_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "A_new_list", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\""}'} headers: content-length: ['329'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&list_id=a_new_list.example.com&role=owner + body: role=owner&list_id=a_new_list.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -158,8 +161,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] - location: ['http://localhost:9001/3.0/members/334326661981448123324369958221998209208'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + location: ['http://localhost:9001/3.0/members/312239441595958538887826064034848970852'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -171,35 +174,35 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list@example.com/config response: - body: {string: !!python/unicode '{"request_address": "a_new_list-request@example.com", - "web_host": "example.com", "digest_last_sent_at": null, "posting_address": - "a_new_list@example.com", "reply_to_address": "", "digest_size_threshold": - 30.0, "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": - "none", "send_welcome_message": true, "fqdn_listname": "a_new_list@example.com", - "http_etag": "\"2c436b0bb4e5b3e256976cceb9890f61e0324649\"", "admin_immed_notify": - true, "owner_address": "a_new_list-owner@example.com", "convert_html_to_plaintext": - false, "autorespond_requests": "none", "list_name": "a_new_list", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "a_new_list-bounces@example.com", "join_address": - "a_new_list-join@example.com", "autoresponse_grace_period": "90d", "anonymous_list": - false, "default_nonmember_action": "hold", "acceptable_aliases": [], "advertised": - true, "display_name": "A_new_list", "posting_pipeline": "default-posting-pipeline", - "filter_content": false, "last_post_at": null, "leave_address": "a_new_list-leave@example.com", - "no_reply_address": "noreply@example.com", "created_at": "2015-04-15T20:00:48.758263", - "subject_prefix": "[A_new_list] ", "autoresponse_request_text": "", "administrivia": - true, "reply_goes_to_list": "no_munging", "next_digest_number": 1, "collapse_alternatives": - true, "archive_policy": "public", "welcome_message_uri": "mailman:///welcome.txt", - "mail_host": "example.com", "autoresponse_owner_text": "", "allow_list_posts": - true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "a_new_list", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "a_new_list-request@example.com", + "posting_address": "a_new_list@example.com", "first_strip_reply_to": false, + "http_etag": "\"4e97478ac8596ae25a8124bb6cfadd55d0e20b96\"", "administrivia": + true, "mail_host": "example.com", "include_rfc2369_headers": true, "admin_immed_notify": + true, "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": + true, "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "a_new_list-join@example.com", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "a_new_list@example.com", "allow_list_posts": true, "subject_prefix": "[A_new_list] + ", "owner_address": "a_new_list-owner@example.com", "archive_policy": "public", + "leave_address": "a_new_list-leave@example.com", "description": "", "acceptable_aliases": + [], "bounces_address": "a_new_list-bounces@example.com", "next_digest_number": + 1, "default_nonmember_action": "hold", "reply_goes_to_list": "no_munging", + "created_at": "2015-04-17T21:06:38.834999", "convert_html_to_plaintext": false, + "display_name": "A_new_list", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} headers: content-length: ['1687'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: convert_html_to_plaintext=False&autoresponse_postings_text=&send_welcome_message=True&autorespond_requests=none&display_name=A_new_list&autorespond_postings=none&filter_content=False&reply_goes_to_list=no_munging&admin_notify_mchanges=False&default_member_action=defer&first_strip_reply_to=False&autoresponse_grace_period=90d&reply_to_address=&autoresponse_owner_text=&description=A+new+list.&archive_policy=public&anonymous_list=False&digest_size_threshold=30.0&advertised=True&autoresponse_request_text=&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&include_rfc2369_headers=True&allow_list_posts=True&admin_immed_notify=True&subject_prefix=%5BA_new_list%5D+&autorespond_owner=none&collapse_alternatives=True&default_nonmember_action=hold&subscription_policy=confirm&posting_pipeline=default-posting-pipeline&administrivia=True + body: advertised=True&administrivia=True&subscription_policy=confirm&collapse_alternatives=True&admin_immed_notify=True&first_strip_reply_to=False&autoresponse_owner_text=&posting_pipeline=default-posting-pipeline&digest_size_threshold=30.0&allow_list_posts=True&autoresponse_request_text=&archive_policy=public&autorespond_postings=none&autoresponse_grace_period=90d&autorespond_owner=none&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&autorespond_requests=none&default_nonmember_action=hold&subject_prefix=%5BA_new_list%5D+&admin_notify_mchanges=False&include_rfc2369_headers=True&description=A+new+list.&reply_to_address=&anonymous_list=False&autoresponse_postings_text=&send_welcome_message=True&convert_html_to_plaintext=False&filter_content=False&default_member_action=defer&reply_goes_to_list=no_munging&display_name=A_new_list headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -211,7 +214,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -223,15 +226,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "a_new_list@example.com", "list_id": - "a_new_list.example.com", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\"", - "list_name": "a_new_list", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", - "volume": 1, "display_name": "A_new_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "a_new_list", "volume": 1, "list_id": + "a_new_list.example.com", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", + "fqdn_listname": "a_new_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "A_new_list", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\""}'} headers: content-length: ['329'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -243,17 +245,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"3759623188199673e6694d21f0003f1e64651318\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/334326661981448123324369958221998209208", - "email": "owner@example.com", "list_id": "a_new_list.example.com", "user": - "http://localhost:9001/3.0/users/117102017827318954078289964069449293796", - "role": "owner", "http_etag": "\"b5c1302df79cb187a3bc0a7898edb19a3ec4d008\"", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "member_id": - 334326661981448123324369958221998209208}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"736d3820c7ed8ca5ccabd889347f202c5c6fe23f\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", + "list_id": "a_new_list.example.com", "http_etag": "\"3a43d65adc806d8717bce5b65b4121c1ac6410b7\"", + "member_id": 312239441595958538887826064034848970852, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", + "self_link": "http://localhost:9001/3.0/members/312239441595958538887826064034848970852"}], + "start": 0}'} headers: - content-length: ['573'] + content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -266,15 +268,15 @@ uri: http://localhost:9001/3.0/lists response: body: {string: !!python/unicode '{"http_etag": "\"dee96dcb9d3f736cc6fa170baeea8f879d7db6f0\"", - "entries": [{"fqdn_listname": "a_new_list@example.com", "list_id": "a_new_list.example.com", - "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\"", "list_name": - "a_new_list", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", - "volume": 1, "display_name": "A_new_list", "mail_host": "example.com", "member_count": - 0}], "start": 0, "total_size": 1}'} + "total_size": 1, "entries": [{"list_name": "a_new_list", "volume": 1, "list_id": + "a_new_list.example.com", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", + "fqdn_listname": "a_new_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "A_new_list", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\""}], + "start": 0}'} headers: content-length: ['434'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:49 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -286,15 +288,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "a_new_list@example.com", "list_id": - "a_new_list.example.com", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\"", - "list_name": "a_new_list", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", - "volume": 1, "display_name": "A_new_list", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "a_new_list", "volume": 1, "list_id": + "a_new_list.example.com", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", + "fqdn_listname": "a_new_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "A_new_list", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\""}'} headers: content-length: ['329'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:49 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -309,7 +310,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:49 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -326,7 +327,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:49 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -338,13 +339,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:49 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -357,11 +359,11 @@ uri: http://localhost:9001/3.0/lists response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:49 GMT'] + date: ['Fri, 17 Apr 2015 21:06:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_index.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_index.yaml index ef33473..c116263 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_index.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_index.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,13 +25,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -43,13 +44,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -65,7 +67,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -79,15 +81,15 @@ uri: http://localhost:9001/3.0/lists response: body: {string: !!python/unicode '{"http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "entries": [{"fqdn_listname": "foo@example.com", "list_id": "foo.example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_name": - "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", "volume": - 1, "display_name": "Foo", "mail_host": "example.com", "member_count": 0}], - "start": 0, "total_size": 1}'} + "total_size": 1, "entries": [{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}], + "start": 0}'} headers: content-length: ['399'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,15 +101,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -119,30 +120,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"request_address": "foo-request@example.com", - "web_host": "example.com", "digest_last_sent_at": null, "posting_address": - "foo@example.com", "reply_to_address": "", "digest_size_threshold": 30.0, - "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": "none", - "send_welcome_message": true, "fqdn_listname": "foo@example.com", "http_etag": - "\"364934c1f57eb144f582394c473883804a69ade5\"", "admin_immed_notify": true, - "owner_address": "foo-owner@example.com", "convert_html_to_plaintext": false, - "autorespond_requests": "none", "list_name": "foo", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "foo-bounces@example.com", "join_address": "foo-join@example.com", - "autoresponse_grace_period": "90d", "anonymous_list": false, "default_nonmember_action": - "hold", "acceptable_aliases": [], "advertised": true, "display_name": "Foo", - "posting_pipeline": "default-posting-pipeline", "filter_content": false, "last_post_at": - null, "leave_address": "foo-leave@example.com", "no_reply_address": "noreply@example.com", - "created_at": "2015-04-15T20:00:48.209721", "subject_prefix": "[Foo] ", "autoresponse_request_text": - "", "administrivia": true, "reply_goes_to_list": "no_munging", "next_digest_number": - 1, "collapse_alternatives": true, "archive_policy": "public", "welcome_message_uri": - "mailman:///welcome.txt", "mail_host": "example.com", "autoresponse_owner_text": - "", "allow_list_posts": true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", + "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": + "\"2f5094e9a18ff49e443fdf380686a324fe00c381\"", "administrivia": true, "mail_host": + "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": + "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", + "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", + "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": + "no_munging", "created_at": "2015-04-17T21:06:38.291968", "convert_html_to_plaintext": + false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -155,14 +156,14 @@ uri: http://localhost:9001/3.0/domains response: body: {string: !!python/unicode '{"http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", - "entries": [{"self_link": "http://localhost:9001/3.0/domains/example.com", + "total_size": 1, "entries": [{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_host": "example.com"}], - "start": 0, "total_size": 1}'} + "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": + "example.com"}], "start": 0}'} headers: content-length: ['338'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -174,13 +175,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -192,30 +194,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"request_address": "foo-request@example.com", - "web_host": "example.com", "digest_last_sent_at": null, "posting_address": - "foo@example.com", "reply_to_address": "", "digest_size_threshold": 30.0, - "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": "none", - "send_welcome_message": true, "fqdn_listname": "foo@example.com", "http_etag": - "\"364934c1f57eb144f582394c473883804a69ade5\"", "admin_immed_notify": true, - "owner_address": "foo-owner@example.com", "convert_html_to_plaintext": false, - "autorespond_requests": "none", "list_name": "foo", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "foo-bounces@example.com", "join_address": "foo-join@example.com", - "autoresponse_grace_period": "90d", "anonymous_list": false, "default_nonmember_action": - "hold", "acceptable_aliases": [], "advertised": true, "display_name": "Foo", - "posting_pipeline": "default-posting-pipeline", "filter_content": false, "last_post_at": - null, "leave_address": "foo-leave@example.com", "no_reply_address": "noreply@example.com", - "created_at": "2015-04-15T20:00:48.209721", "subject_prefix": "[Foo] ", "autoresponse_request_text": - "", "administrivia": true, "reply_goes_to_list": "no_munging", "next_digest_number": - 1, "collapse_alternatives": true, "archive_policy": "public", "welcome_message_uri": - "mailman:///welcome.txt", "mail_host": "example.com", "autoresponse_owner_text": - "", "allow_list_posts": true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", + "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": + "\"2f5094e9a18ff49e443fdf380686a324fe00c381\"", "administrivia": true, "mail_host": + "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": + "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", + "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", + "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": + "no_munging", "created_at": "2015-04-17T21:06:38.291968", "convert_html_to_plaintext": + false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -227,30 +229,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"request_address": "foo-request@example.com", - "web_host": "example.com", "digest_last_sent_at": null, "posting_address": - "foo@example.com", "reply_to_address": "", "digest_size_threshold": 30.0, - "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": "none", - "send_welcome_message": true, "fqdn_listname": "foo@example.com", "http_etag": - "\"364934c1f57eb144f582394c473883804a69ade5\"", "admin_immed_notify": true, - "owner_address": "foo-owner@example.com", "convert_html_to_plaintext": false, - "autorespond_requests": "none", "list_name": "foo", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "foo-bounces@example.com", "join_address": "foo-join@example.com", - "autoresponse_grace_period": "90d", "anonymous_list": false, "default_nonmember_action": - "hold", "acceptable_aliases": [], "advertised": true, "display_name": "Foo", - "posting_pipeline": "default-posting-pipeline", "filter_content": false, "last_post_at": - null, "leave_address": "foo-leave@example.com", "no_reply_address": "noreply@example.com", - "created_at": "2015-04-15T20:00:48.209721", "subject_prefix": "[Foo] ", "autoresponse_request_text": - "", "administrivia": true, "reply_goes_to_list": "no_munging", "next_digest_number": - 1, "collapse_alternatives": true, "archive_policy": "public", "welcome_message_uri": - "mailman:///welcome.txt", "mail_host": "example.com", "autoresponse_owner_text": - "", "allow_list_posts": true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", + "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": + "\"2f5094e9a18ff49e443fdf380686a324fe00c381\"", "administrivia": true, "mail_host": + "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": + "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", + "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", + "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": + "no_munging", "created_at": "2015-04-17T21:06:38.291968", "convert_html_to_plaintext": + false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -263,15 +265,15 @@ uri: http://localhost:9001/3.0/lists response: body: {string: !!python/unicode '{"http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "entries": [{"fqdn_listname": "foo@example.com", "list_id": "foo.example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_name": - "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", "volume": - 1, "display_name": "Foo", "mail_host": "example.com", "member_count": 0}], - "start": 0, "total_size": 1}'} + "total_size": 1, "entries": [{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}], + "start": 0}'} headers: content-length: ['399'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -283,15 +285,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -306,7 +307,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml index 8c90c88..5f8acd0 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,13 +25,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -43,13 +44,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -65,7 +67,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -78,15 +80,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,11 +100,11 @@ uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -116,11 +117,11 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -133,15 +134,15 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: subscriber=newmod%40example.com&list_id=foo.example.com&role=moderator + body: role=moderator&list_id=foo.example.com&subscriber=newmod%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -153,8 +154,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] - location: ['http://localhost:9001/3.0/members/77877321659467212687479413596598956489'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + location: ['http://localhost:9001/3.0/members/244937454762324737467718684304844593898'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -167,11 +168,11 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -183,16 +184,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"fbf6bcd8ca1197bca59d957ecd23dcb9ef1c37de\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/77877321659467212687479413596598956489", - "email": "newmod@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/280696364750368978857520113682724449041", - "role": "moderator", "http_etag": "\"87c931801634d83cddd530b9f55873f04b7d1820\"", - "address": "http://localhost:9001/3.0/addresses/newmod@example.com", "member_id": - 77877321659467212687479413596598956489}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"dfb3e7da8895aeade05363634b283541a6a5ed47\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", + "email": "newmod@example.com", "address": "http://localhost:9001/3.0/addresses/newmod@example.com", + "list_id": "foo.example.com", "http_etag": "\"2742e6ecde3e5d149f3c72d11c29b3f095f77c92\"", + "member_id": 244937454762324737467718684304844593898, "user": "http://localhost:9001/3.0/users/326716575188604603029690470844928178966", + "self_link": "http://localhost:9001/3.0/members/244937454762324737467718684304844593898"}], + "start": 0}'} headers: - content-length: ['570'] + content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -204,16 +206,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"fbf6bcd8ca1197bca59d957ecd23dcb9ef1c37de\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/77877321659467212687479413596598956489", - "email": "newmod@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/280696364750368978857520113682724449041", - "role": "moderator", "http_etag": "\"87c931801634d83cddd530b9f55873f04b7d1820\"", - "address": "http://localhost:9001/3.0/addresses/newmod@example.com", "member_id": - 77877321659467212687479413596598956489}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"dfb3e7da8895aeade05363634b283541a6a5ed47\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", + "email": "newmod@example.com", "address": "http://localhost:9001/3.0/addresses/newmod@example.com", + "list_id": "foo.example.com", "http_etag": "\"2742e6ecde3e5d149f3c72d11c29b3f095f77c92\"", + "member_id": 244937454762324737467718684304844593898, "user": "http://localhost:9001/3.0/users/326716575188604603029690470844928178966", + "self_link": "http://localhost:9001/3.0/members/244937454762324737467718684304844593898"}], + "start": 0}'} headers: - content-length: ['570'] + content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -225,15 +228,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -248,7 +250,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml index a80c901..588a630 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,13 +25,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -43,13 +44,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -65,7 +67,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -78,15 +80,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,11 +100,11 @@ uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -116,11 +117,11 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -133,15 +134,15 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: subscriber=newowner%40example.com&list_id=foo.example.com&role=owner + body: role=owner&list_id=foo.example.com&subscriber=newowner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -153,8 +154,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] - location: ['http://localhost:9001/3.0/members/316580494501498897764553969239217371297'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + location: ['http://localhost:9001/3.0/members/205938900403193169744608364383040344630'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -166,16 +167,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"ed6c0338408c1922cf1d2efafd4e048aea7b4952\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/316580494501498897764553969239217371297", - "email": "newowner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/56780513472939226760192616016157807096", - "role": "owner", "http_etag": "\"68c877d413e7baae94835a96508178d6837c3d77\"", - "address": "http://localhost:9001/3.0/addresses/newowner@example.com", "member_id": - 316580494501498897764553969239217371297}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"189efb90bc8c0c5fe25d74afc449b6a405c9195b\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "newowner@example.com", "address": "http://localhost:9001/3.0/addresses/newowner@example.com", + "list_id": "foo.example.com", "http_etag": "\"2b93487540419e20335f17f4c98f47c7d918b415\"", + "member_id": 205938900403193169744608364383040344630, "user": "http://localhost:9001/3.0/users/134264009653686833174579232298647003963", + "self_link": "http://localhost:9001/3.0/members/205938900403193169744608364383040344630"}], + "start": 0}'} headers: - content-length: ['571'] + content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -188,11 +190,11 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -204,16 +206,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"ed6c0338408c1922cf1d2efafd4e048aea7b4952\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/316580494501498897764553969239217371297", - "email": "newowner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/56780513472939226760192616016157807096", - "role": "owner", "http_etag": "\"68c877d413e7baae94835a96508178d6837c3d77\"", - "address": "http://localhost:9001/3.0/addresses/newowner@example.com", "member_id": - 316580494501498897764553969239217371297}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"189efb90bc8c0c5fe25d74afc449b6a405c9195b\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "newowner@example.com", "address": "http://localhost:9001/3.0/addresses/newowner@example.com", + "list_id": "foo.example.com", "http_etag": "\"2b93487540419e20335f17f4c98f47c7d918b415\"", + "member_id": 205938900403193169744608364383040344630, "user": "http://localhost:9001/3.0/users/134264009653686833174579232298647003963", + "self_link": "http://localhost:9001/3.0/members/205938900403193169744608364383040344630"}], + "start": 0}'} headers: - content-length: ['571'] + content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -225,15 +228,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -248,7 +250,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner_new_owner_added.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner_new_owner_added.yaml index 55dbff5..9ebd657 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner_new_owner_added.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner_new_owner_added.yaml @@ -8,16 +8,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"ed6c0338408c1922cf1d2efafd4e048aea7b4952\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/316580494501498897764553969239217371297", - "email": "newowner@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/56780513472939226760192616016157807096", - "role": "owner", "http_etag": "\"68c877d413e7baae94835a96508178d6837c3d77\"", - "address": "http://localhost:9001/3.0/addresses/newowner@example.com", "member_id": - 316580494501498897764553969239217371297}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"189efb90bc8c0c5fe25d74afc449b6a405c9195b\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", + "email": "newowner@example.com", "address": "http://localhost:9001/3.0/addresses/newowner@example.com", + "list_id": "foo.example.com", "http_etag": "\"2b93487540419e20335f17f4c98f47c7d918b415\"", + "member_id": 205938900403193169744608364383040344630, "user": "http://localhost:9001/3.0/users/134264009653686833174579232298647003963", + "self_link": "http://localhost:9001/3.0/members/205938900403193169744608364383040344630"}], + "start": 0}'} headers: - content-length: ['571'] + content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:41 GMT'] + date: ['Fri, 17 Apr 2015 21:06:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml index befcb0b..ba4a800 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml @@ -8,16 +8,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"fbf6bcd8ca1197bca59d957ecd23dcb9ef1c37de\"", - "entries": [{"delivery_mode": "regular", "self_link": "http://localhost:9001/3.0/members/77877321659467212687479413596598956489", - "email": "newmod@example.com", "list_id": "foo.example.com", "user": "http://localhost:9001/3.0/users/280696364750368978857520113682724449041", - "role": "moderator", "http_etag": "\"87c931801634d83cddd530b9f55873f04b7d1820\"", - "address": "http://localhost:9001/3.0/addresses/newmod@example.com", "member_id": - 77877321659467212687479413596598956489}], "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"dfb3e7da8895aeade05363634b283541a6a5ed47\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", + "email": "newmod@example.com", "address": "http://localhost:9001/3.0/addresses/newmod@example.com", + "list_id": "foo.example.com", "http_etag": "\"2742e6ecde3e5d149f3c72d11c29b3f095f77c92\"", + "member_id": 244937454762324737467718684304844593898, "user": "http://localhost:9001/3.0/users/326716575188604603029690470844928178966", + "self_link": "http://localhost:9001/3.0/members/244937454762324737467718684304844593898"}], + "start": 0}'} headers: - content-length: ['570'] + content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:40 GMT'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml index 058b8dc..8c09397 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml @@ -12,7 +12,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] location: ['http://localhost:9001/3.0/domains/example.org'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -25,13 +25,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.org response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.org", + body: {string: !!python/unicode '{"mail_host": "example.org", "description": null, "base_url": "http://example.org", "http_etag": "\"f8247f55d4a0a1d987c89cc238bb0dbc2c0e1089\"", - "mail_host": "example.org", "description": null, "url_host": "example.org"}'} + "self_link": "http://localhost:9001/3.0/domains/example.org", "url_host": + "example.org"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -47,7 +48,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] location: ['http://localhost:9001/3.0/lists/test.example.org'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -60,15 +61,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org response: - body: {string: !!python/unicode '{"fqdn_listname": "test@example.org", "list_id": - "test.example.org", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\"", - "list_name": "test", "self_link": "http://localhost:9001/3.0/lists/test.example.org", - "volume": 1, "display_name": "Test", "mail_host": "example.org", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test", "volume": 1, "list_id": + "test.example.org", "self_link": "http://localhost:9001/3.0/lists/test.example.org", + "fqdn_listname": "test@example.org", "mail_host": "example.org", "member_count": + 0, "display_name": "Test", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\""}'} headers: content-length: ['299'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -80,15 +80,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org response: - body: {string: !!python/unicode '{"fqdn_listname": "test@example.org", "list_id": - "test.example.org", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\"", - "list_name": "test", "self_link": "http://localhost:9001/3.0/lists/test.example.org", - "volume": 1, "display_name": "Test", "mail_host": "example.org", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test", "volume": 1, "list_id": + "test.example.org", "self_link": "http://localhost:9001/3.0/lists/test.example.org", + "fqdn_listname": "test@example.org", "mail_host": "example.org", "member_count": + 0, "display_name": "Test", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\""}'} headers: content-length: ['299'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -101,11 +100,11 @@ uri: http://localhost:9001/3.0/lists/test.example.org/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -118,11 +117,11 @@ uri: http://localhost:9001/3.0/lists/test.example.org/roster/moderator response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -134,30 +133,31 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org/config response: - body: {string: !!python/unicode '{"request_address": "test-request@example.org", - "web_host": "example.org", "digest_last_sent_at": null, "posting_address": - "test@example.org", "reply_to_address": "", "digest_size_threshold": 30.0, - "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": "none", - "send_welcome_message": true, "fqdn_listname": "test@example.org", "http_etag": - "\"878451fcdc59291f9e13c6f12134bdc400d45b97\"", "admin_immed_notify": true, - "owner_address": "test-owner@example.org", "convert_html_to_plaintext": false, - "autorespond_requests": "none", "list_name": "test", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "test-bounces@example.org", "join_address": "test-join@example.org", - "autoresponse_grace_period": "90d", "anonymous_list": false, "default_nonmember_action": - "hold", "acceptable_aliases": [], "advertised": true, "display_name": "Test", - "posting_pipeline": "default-posting-pipeline", "filter_content": false, "last_post_at": - null, "leave_address": "test-leave@example.org", "no_reply_address": "noreply@example.org", - "created_at": "2015-04-15T20:00:46.186892", "subject_prefix": "[Test] ", "autoresponse_request_text": - "", "administrivia": true, "reply_goes_to_list": "no_munging", "next_digest_number": - 1, "collapse_alternatives": true, "archive_policy": "public", "welcome_message_uri": - "mailman:///welcome.txt", "mail_host": "example.org", "autoresponse_owner_text": - "", "allow_list_posts": true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "test", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.org", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "test-request@example.org", + "posting_address": "test@example.org", "first_strip_reply_to": false, "http_etag": + "\"5bec8629f56043f9353337168030dc506fceac83\"", "administrivia": true, "mail_host": + "example.org", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "test-join@example.org", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "test@example.org", "allow_list_posts": true, "subject_prefix": "[Test] ", + "owner_address": "test-owner@example.org", "archive_policy": "public", "leave_address": + "test-leave@example.org", "description": "", "acceptable_aliases": [], "bounces_address": + "test-bounces@example.org", "next_digest_number": 1, "default_nonmember_action": + "hold", "reply_goes_to_list": "no_munging", "created_at": "2015-04-17T21:06:36.091279", + "convert_html_to_plaintext": false, "display_name": "Test", "autorespond_requests": + "none", "no_reply_address": "noreply@example.org", "digest_last_sent_at": + null}'} headers: content-length: ['1627'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -169,30 +169,31 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org/config response: - body: {string: !!python/unicode '{"request_address": "test-request@example.org", - "web_host": "example.org", "digest_last_sent_at": null, "posting_address": - "test@example.org", "reply_to_address": "", "digest_size_threshold": 30.0, - "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": "none", - "send_welcome_message": true, "fqdn_listname": "test@example.org", "http_etag": - "\"878451fcdc59291f9e13c6f12134bdc400d45b97\"", "admin_immed_notify": true, - "owner_address": "test-owner@example.org", "convert_html_to_plaintext": false, - "autorespond_requests": "none", "list_name": "test", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "test-bounces@example.org", "join_address": "test-join@example.org", - "autoresponse_grace_period": "90d", "anonymous_list": false, "default_nonmember_action": - "hold", "acceptable_aliases": [], "advertised": true, "display_name": "Test", - "posting_pipeline": "default-posting-pipeline", "filter_content": false, "last_post_at": - null, "leave_address": "test-leave@example.org", "no_reply_address": "noreply@example.org", - "created_at": "2015-04-15T20:00:46.186892", "subject_prefix": "[Test] ", "autoresponse_request_text": - "", "administrivia": true, "reply_goes_to_list": "no_munging", "next_digest_number": - 1, "collapse_alternatives": true, "archive_policy": "public", "welcome_message_uri": - "mailman:///welcome.txt", "mail_host": "example.org", "autoresponse_owner_text": - "", "allow_list_posts": true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "test", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.org", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "test-request@example.org", + "posting_address": "test@example.org", "first_strip_reply_to": false, "http_etag": + "\"5bec8629f56043f9353337168030dc506fceac83\"", "administrivia": true, "mail_host": + "example.org", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "test-join@example.org", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "test@example.org", "allow_list_posts": true, "subject_prefix": "[Test] ", + "owner_address": "test-owner@example.org", "archive_policy": "public", "leave_address": + "test-leave@example.org", "description": "", "acceptable_aliases": [], "bounces_address": + "test-bounces@example.org", "next_digest_number": 1, "default_nonmember_action": + "hold", "reply_goes_to_list": "no_munging", "created_at": "2015-04-17T21:06:36.091279", + "convert_html_to_plaintext": false, "display_name": "Test", "autorespond_requests": + "none", "no_reply_address": "noreply@example.org", "digest_last_sent_at": + null}'} headers: content-length: ['1627'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -204,30 +205,31 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org/config response: - body: {string: !!python/unicode '{"request_address": "test-request@example.org", - "web_host": "example.org", "digest_last_sent_at": null, "posting_address": - "test@example.org", "reply_to_address": "", "digest_size_threshold": 30.0, - "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": "none", - "send_welcome_message": true, "fqdn_listname": "test@example.org", "http_etag": - "\"878451fcdc59291f9e13c6f12134bdc400d45b97\"", "admin_immed_notify": true, - "owner_address": "test-owner@example.org", "convert_html_to_plaintext": false, - "autorespond_requests": "none", "list_name": "test", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "test-bounces@example.org", "join_address": "test-join@example.org", - "autoresponse_grace_period": "90d", "anonymous_list": false, "default_nonmember_action": - "hold", "acceptable_aliases": [], "advertised": true, "display_name": "Test", - "posting_pipeline": "default-posting-pipeline", "filter_content": false, "last_post_at": - null, "leave_address": "test-leave@example.org", "no_reply_address": "noreply@example.org", - "created_at": "2015-04-15T20:00:46.186892", "subject_prefix": "[Test] ", "autoresponse_request_text": - "", "administrivia": true, "reply_goes_to_list": "no_munging", "next_digest_number": - 1, "collapse_alternatives": true, "archive_policy": "public", "welcome_message_uri": - "mailman:///welcome.txt", "mail_host": "example.org", "autoresponse_owner_text": - "", "allow_list_posts": true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "test", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.org", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "test-request@example.org", + "posting_address": "test@example.org", "first_strip_reply_to": false, "http_etag": + "\"5bec8629f56043f9353337168030dc506fceac83\"", "administrivia": true, "mail_host": + "example.org", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "test-join@example.org", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "test@example.org", "allow_list_posts": true, "subject_prefix": "[Test] ", + "owner_address": "test-owner@example.org", "archive_policy": "public", "leave_address": + "test-leave@example.org", "description": "", "acceptable_aliases": [], "bounces_address": + "test-bounces@example.org", "next_digest_number": 1, "default_nonmember_action": + "hold", "reply_goes_to_list": "no_munging", "created_at": "2015-04-17T21:06:36.091279", + "convert_html_to_plaintext": false, "display_name": "Test", "autorespond_requests": + "none", "no_reply_address": "noreply@example.org", "digest_last_sent_at": + null}'} headers: content-length: ['1627'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -239,30 +241,31 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org/config response: - body: {string: !!python/unicode '{"request_address": "test-request@example.org", - "web_host": "example.org", "digest_last_sent_at": null, "posting_address": - "test@example.org", "reply_to_address": "", "digest_size_threshold": 30.0, - "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": "none", - "send_welcome_message": true, "fqdn_listname": "test@example.org", "http_etag": - "\"878451fcdc59291f9e13c6f12134bdc400d45b97\"", "admin_immed_notify": true, - "owner_address": "test-owner@example.org", "convert_html_to_plaintext": false, - "autorespond_requests": "none", "list_name": "test", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "test-bounces@example.org", "join_address": "test-join@example.org", - "autoresponse_grace_period": "90d", "anonymous_list": false, "default_nonmember_action": - "hold", "acceptable_aliases": [], "advertised": true, "display_name": "Test", - "posting_pipeline": "default-posting-pipeline", "filter_content": false, "last_post_at": - null, "leave_address": "test-leave@example.org", "no_reply_address": "noreply@example.org", - "created_at": "2015-04-15T20:00:46.186892", "subject_prefix": "[Test] ", "autoresponse_request_text": - "", "administrivia": true, "reply_goes_to_list": "no_munging", "next_digest_number": - 1, "collapse_alternatives": true, "archive_policy": "public", "welcome_message_uri": - "mailman:///welcome.txt", "mail_host": "example.org", "autoresponse_owner_text": - "", "allow_list_posts": true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "test", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.org", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "test-request@example.org", + "posting_address": "test@example.org", "first_strip_reply_to": false, "http_etag": + "\"5bec8629f56043f9353337168030dc506fceac83\"", "administrivia": true, "mail_host": + "example.org", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "test-join@example.org", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "test@example.org", "allow_list_posts": true, "subject_prefix": "[Test] ", + "owner_address": "test-owner@example.org", "archive_policy": "public", "leave_address": + "test-leave@example.org", "description": "", "acceptable_aliases": [], "bounces_address": + "test-bounces@example.org", "next_digest_number": 1, "default_nonmember_action": + "hold", "reply_goes_to_list": "no_munging", "created_at": "2015-04-17T21:06:36.091279", + "convert_html_to_plaintext": false, "display_name": "Test", "autorespond_requests": + "none", "no_reply_address": "noreply@example.org", "digest_last_sent_at": + null}'} headers: content-length: ['1627'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -277,7 +280,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -292,7 +295,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -308,7 +311,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] location: ['http://localhost:9001/3.0/domains/example.org'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -321,13 +324,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.org response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.org", + body: {string: !!python/unicode '{"mail_host": "example.org", "description": null, "base_url": "http://example.org", "http_etag": "\"f8247f55d4a0a1d987c89cc238bb0dbc2c0e1089\"", - "mail_host": "example.org", "description": null, "url_host": "example.org"}'} + "self_link": "http://localhost:9001/3.0/domains/example.org", "url_host": + "example.org"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -343,7 +347,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] location: ['http://localhost:9001/3.0/lists/test.example.org'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -356,15 +360,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org response: - body: {string: !!python/unicode '{"fqdn_listname": "test@example.org", "list_id": - "test.example.org", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\"", - "list_name": "test", "self_link": "http://localhost:9001/3.0/lists/test.example.org", - "volume": 1, "display_name": "Test", "mail_host": "example.org", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test", "volume": 1, "list_id": + "test.example.org", "self_link": "http://localhost:9001/3.0/lists/test.example.org", + "fqdn_listname": "test@example.org", "mail_host": "example.org", "member_count": + 0, "display_name": "Test", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\""}'} headers: content-length: ['299'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -376,15 +379,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org response: - body: {string: !!python/unicode '{"fqdn_listname": "test@example.org", "list_id": - "test.example.org", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\"", - "list_name": "test", "self_link": "http://localhost:9001/3.0/lists/test.example.org", - "volume": 1, "display_name": "Test", "mail_host": "example.org", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "test", "volume": 1, "list_id": + "test.example.org", "self_link": "http://localhost:9001/3.0/lists/test.example.org", + "fqdn_listname": "test@example.org", "mail_host": "example.org", "member_count": + 0, "display_name": "Test", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\""}'} headers: content-length: ['299'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:46 GMT'] + date: ['Fri, 17 Apr 2015 21:06:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -399,7 +401,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -414,7 +416,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml new file mode 100644 index 0000000..264490d --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml @@ -0,0 +1,269 @@ +interactions: +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode 'Duplicate email host: example.com'} + headers: + content-length: ['33'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 400, message: Bad Request} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, + "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "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] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, + "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "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] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=open_list%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + location: ['http://localhost:9001/3.0/lists/open_list.example.com'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/open_list.example.com + response: + body: {string: !!python/unicode '{"list_name": "open_list", "volume": 1, "list_id": + "open_list.example.com", "self_link": "http://localhost:9001/3.0/lists/open_list.example.com", + "fqdn_listname": "open_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Open_list", "http_etag": "\"6726e101e1dd1de6043eee72f741d4c2479f4735\""}'} + headers: + content-length: ['324'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/open_list@example.com/config + response: + body: {string: !!python/unicode '{"list_name": "open_list", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "open_list-request@example.com", + "posting_address": "open_list@example.com", "first_strip_reply_to": false, + "http_etag": "\"4949c883ec5b6f02d74c3bdb9e8d491c964eb20a\"", "administrivia": + true, "mail_host": "example.com", "include_rfc2369_headers": true, "admin_immed_notify": + true, "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": + true, "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "open_list-join@example.com", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "open_list@example.com", "allow_list_posts": true, "subject_prefix": "[Open_list] + ", "owner_address": "open_list-owner@example.com", "archive_policy": "public", + "leave_address": "open_list-leave@example.com", "description": "", "acceptable_aliases": + [], "bounces_address": "open_list-bounces@example.com", "next_digest_number": + 1, "default_nonmember_action": "hold", "reply_goes_to_list": "no_munging", + "created_at": "2015-04-17T21:06:29.676463", "convert_html_to_plaintext": false, + "display_name": "Open_list", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} + headers: + content-length: ['1677'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: advertised=True&administrivia=True&subscription_policy=open&collapse_alternatives=True&admin_immed_notify=True&first_strip_reply_to=False&autoresponse_owner_text=&posting_pipeline=default-posting-pipeline&digest_size_threshold=30.0&allow_list_posts=True&autoresponse_request_text=&archive_policy=public&autorespond_postings=none&autoresponse_grace_period=90d&autorespond_owner=none&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&autorespond_requests=none&default_nonmember_action=hold&subject_prefix=%5BOpen_list%5D+&admin_notify_mchanges=False&include_rfc2369_headers=True&description=&reply_to_address=&anonymous_list=False&autoresponse_postings_text=&send_welcome_message=True&convert_html_to_plaintext=False&filter_content=False&default_member_action=defer&reply_goes_to_list=no_munging&display_name=Open_list + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'PATCH' + uri: http://localhost:9001/3.0/lists/open_list@example.com/config + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/open_list.example.com + response: + body: {string: !!python/unicode '{"list_name": "open_list", "volume": 1, "list_id": + "open_list.example.com", "self_link": "http://localhost:9001/3.0/lists/open_list.example.com", + "fqdn_listname": "open_list@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Open_list", "http_etag": "\"6726e101e1dd1de6043eee72f741d4c2479f4735\""}'} + headers: + content-length: ['324'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/open_list.example.com/roster/owner + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "total_size": 0, "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/open_list.example.com/roster/moderator + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "total_size": 0, "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: pre_verified=True&list_id=open_list.example.com&display_name=None&pre_confirmed=True&subscriber=fritz%40example.org + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + location: ['http://localhost:9001/3.0/members/219379763871340832809046435098342039931'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/open_list@example.com/roster/member + response: + body: {string: !!python/unicode '{"http_etag": "\"2bcb03c8560a7d7b0de36a5573530e7b34734f6a\"", + "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "member", + "email": "fritz@example.org", "address": "http://localhost:9001/3.0/addresses/fritz@example.org", + "list_id": "open_list.example.com", "http_etag": "\"487ae31099afaa824f32e8272c026094cff7f856\"", + "member_id": 219379763871340832809046435098342039931, "user": "http://localhost:9001/3.0/users/45245778716836160890668793583968810730", + "self_link": "http://localhost:9001/3.0/members/219379763871340832809046435098342039931"}], + "start": 0}'} + headers: + content-length: ['572'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/open_list@example.com/requests + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "total_size": 0, "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/lists/open_list@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml new file mode 100644 index 0000000..c95f3a7 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml @@ -0,0 +1,268 @@ +interactions: +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode 'Duplicate email host: example.com'} + headers: + content-length: ['33'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 400, message: Bad Request} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, + "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "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] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, + "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "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] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=moderate_subs%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + location: ['http://localhost:9001/3.0/lists/moderate_subs.example.com'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/moderate_subs.example.com + response: + body: {string: !!python/unicode '{"list_name": "moderate_subs", "volume": 1, "list_id": + "moderate_subs.example.com", "self_link": "http://localhost:9001/3.0/lists/moderate_subs.example.com", + "fqdn_listname": "moderate_subs@example.com", "mail_host": "example.com", + "member_count": 0, "display_name": "Moderate_subs", "http_etag": "\"4cf5a031a451ad84a54e4c708cacda8e676e617f\""}'} + headers: + content-length: ['344'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/config + response: + body: {string: !!python/unicode '{"list_name": "moderate_subs", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "moderate_subs-request@example.com", + "posting_address": "moderate_subs@example.com", "first_strip_reply_to": false, + "http_etag": "\"9b93ebb3a0223bb225b30f8793f6ad3f3c937b4c\"", "administrivia": + true, "mail_host": "example.com", "include_rfc2369_headers": true, "admin_immed_notify": + true, "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": + true, "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "moderate_subs-join@example.com", "scheme": "http", "subscription_policy": + "confirm", "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, + "fqdn_listname": "moderate_subs@example.com", "allow_list_posts": true, "subject_prefix": + "[Moderate_subs] ", "owner_address": "moderate_subs-owner@example.com", "archive_policy": + "public", "leave_address": "moderate_subs-leave@example.com", "description": + "", "acceptable_aliases": [], "bounces_address": "moderate_subs-bounces@example.com", + "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": + "no_munging", "created_at": "2015-04-17T21:06:29.031666", "convert_html_to_plaintext": + false, "display_name": "Moderate_subs", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} + headers: + content-length: ['1717'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: advertised=True&administrivia=True&subscription_policy=moderate&collapse_alternatives=True&admin_immed_notify=True&first_strip_reply_to=False&autoresponse_owner_text=&posting_pipeline=default-posting-pipeline&digest_size_threshold=30.0&allow_list_posts=True&autoresponse_request_text=&archive_policy=public&autorespond_postings=none&autoresponse_grace_period=90d&autorespond_owner=none&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&autorespond_requests=none&default_nonmember_action=hold&subject_prefix=%5BModerate_subs%5D+&admin_notify_mchanges=False&include_rfc2369_headers=True&description=&reply_to_address=&anonymous_list=False&autoresponse_postings_text=&send_welcome_message=True&convert_html_to_plaintext=False&filter_content=False&default_member_action=defer&reply_goes_to_list=no_munging&display_name=Moderate_subs + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'PATCH' + uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/config + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/moderate_subs.example.com + response: + body: {string: !!python/unicode '{"list_name": "moderate_subs", "volume": 1, "list_id": + "moderate_subs.example.com", "self_link": "http://localhost:9001/3.0/lists/moderate_subs.example.com", + "fqdn_listname": "moderate_subs@example.com", "mail_host": "example.com", + "member_count": 0, "display_name": "Moderate_subs", "http_etag": "\"4cf5a031a451ad84a54e4c708cacda8e676e617f\""}'} + headers: + content-length: ['344'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/moderate_subs.example.com/roster/owner + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "total_size": 0, "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/moderate_subs.example.com/roster/moderator + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "total_size": 0, "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: pre_verified=True&list_id=moderate_subs.example.com&display_name=None&pre_confirmed=True&subscriber=fritz%40example.org + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode '{"token_owner": "moderator", "token": "0d68d98345d6f9e6aeff7b07fbcb9b38d32e3d99", + "http_etag": "\"35c29bdc6bed1e508941e196bef439f518b6bb9d\""}'} + headers: + content-length: ['142'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/roster/member + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "total_size": 0, "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/requests + response: + body: {string: !!python/unicode '{"http_etag": "\"9db1bd05d994bb92bac0e2d60006db385b1109e3\"", + "total_size": 1, "entries": [{"http_etag": "\"36d7b15da47d1fb264f929b7f6a105c5a3e81743\"", + "email": "fritz@example.org", "list_id": "moderate_subs.example.com", "when": + "2015-04-17T21:06:29", "display_name": "None", "token_owner": "moderator", + "token": "0d68d98345d6f9e6aeff7b07fbcb9b38d32e3d99"}], "start": 0}'} + headers: + content-length: ['372'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/lists/moderate_subs@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml index 077d4d3..f2a2c68 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,13 +25,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -43,13 +44,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -65,7 +67,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -78,15 +80,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,11 +100,11 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -116,11 +117,11 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -133,11 +134,11 @@ uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -149,30 +150,65 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"request_address": "foo-request@example.com", - "web_host": "example.com", "digest_last_sent_at": null, "posting_address": - "foo@example.com", "reply_to_address": "", "digest_size_threshold": 30.0, - "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": "none", - "send_welcome_message": true, "fqdn_listname": "foo@example.com", "http_etag": - "\"8a0be5d9bc8fe8bd7c109dbd54abdac8dfe87acc\"", "admin_immed_notify": true, - "owner_address": "foo-owner@example.com", "convert_html_to_plaintext": false, - "autorespond_requests": "none", "list_name": "foo", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "foo-bounces@example.com", "join_address": "foo-join@example.com", - "autoresponse_grace_period": "90d", "anonymous_list": false, "default_nonmember_action": - "hold", "acceptable_aliases": [], "advertised": true, "display_name": "Foo", - "posting_pipeline": "default-posting-pipeline", "filter_content": false, "last_post_at": - null, "leave_address": "foo-leave@example.com", "no_reply_address": "noreply@example.com", - "created_at": "2015-04-15T20:00:47.277419", "subject_prefix": "[Foo] ", "autoresponse_request_text": - "", "administrivia": true, "reply_goes_to_list": "no_munging", "next_digest_number": - 1, "collapse_alternatives": true, "archive_policy": "public", "welcome_message_uri": - "mailman:///welcome.txt", "mail_host": "example.com", "autoresponse_owner_text": - "", "allow_list_posts": true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", + "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": + "\"b455b28a01cbf6d739201ca283c72fe1d4d9ac0d\"", "administrivia": true, "mail_host": + "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": + "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", + "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", + "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": + "no_munging", "created_at": "2015-04-17T21:06:37.251533", "convert_html_to_plaintext": + false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", + "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": + "\"b455b28a01cbf6d739201ca283c72fe1d4d9ac0d\"", "administrivia": true, "mail_host": + "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": + "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", + "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", + "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": + "no_munging", "created_at": "2015-04-17T21:06:37.251533", "convert_html_to_plaintext": + false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} + headers: + content-length: ['1617'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -185,15 +221,15 @@ uri: http://localhost:9001/3.0/lists response: body: {string: !!python/unicode '{"http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "entries": [{"fqdn_listname": "foo@example.com", "list_id": "foo.example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_name": - "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", "volume": - 1, "display_name": "Foo", "mail_host": "example.com", "member_count": 0}], - "start": 0, "total_size": 1}'} + "total_size": 1, "entries": [{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}], + "start": 0}'} headers: content-length: ['399'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -205,15 +241,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -228,7 +263,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -245,7 +280,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -257,13 +292,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -275,13 +311,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/domains/example.com", + body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "mail_host": "example.com", "description": null, "url_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] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -297,7 +334,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -310,15 +347,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -331,11 +367,11 @@ uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + "total_size": 0, "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -347,30 +383,65 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"request_address": "foo-request@example.com", - "web_host": "example.com", "digest_last_sent_at": null, "posting_address": - "foo@example.com", "reply_to_address": "", "digest_size_threshold": 30.0, - "admin_notify_mchanges": false, "scheme": "http", "autorespond_owner": "none", - "send_welcome_message": true, "fqdn_listname": "foo@example.com", "http_etag": - "\"a327b7a2a7119d56914bec23068630a71f634847\"", "admin_immed_notify": true, - "owner_address": "foo-owner@example.com", "convert_html_to_plaintext": false, - "autorespond_requests": "none", "list_name": "foo", "autoresponse_postings_text": - "", "post_id": 1, "volume": 1, "include_rfc2369_headers": true, "first_strip_reply_to": - false, "subscription_policy": "confirm", "description": "", "default_member_action": - "defer", "bounces_address": "foo-bounces@example.com", "join_address": "foo-join@example.com", - "autoresponse_grace_period": "90d", "anonymous_list": false, "default_nonmember_action": - "hold", "acceptable_aliases": [], "advertised": true, "display_name": "Foo", - "posting_pipeline": "default-posting-pipeline", "filter_content": false, "last_post_at": - null, "leave_address": "foo-leave@example.com", "no_reply_address": "noreply@example.com", - "created_at": "2015-04-15T20:00:47.719111", "subject_prefix": "[Foo] ", "autoresponse_request_text": - "", "administrivia": true, "reply_goes_to_list": "no_munging", "next_digest_number": - 1, "collapse_alternatives": true, "archive_policy": "public", "welcome_message_uri": - "mailman:///welcome.txt", "mail_host": "example.com", "autoresponse_owner_text": - "", "allow_list_posts": true, "autorespond_postings": "none"}'} + body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", + "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": + "\"4add483b459686140ce72de3c4f3ace80abba461\"", "administrivia": true, "mail_host": + "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": + "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", + "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", + "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": + "no_munging", "created_at": "2015-04-17T21:06:37.760035", "convert_html_to_plaintext": + false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:47 GMT'] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": + true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": + "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": + "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", + "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": + "\"4add483b459686140ce72de3c4f3ace80abba461\"", "administrivia": true, "mail_host": + "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, + "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, + "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": + null, "filter_content": false, "autoresponse_owner_text": "", "join_address": + "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", + "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": + "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": + "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", + "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", + "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": + "no_munging", "created_at": "2015-04-17T21:06:37.760035", "convert_html_to_plaintext": + false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": + "noreply@example.com", "digest_last_sent_at": null}'} + headers: + content-length: ['1617'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:06:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -383,15 +454,15 @@ uri: http://localhost:9001/3.0/lists response: body: {string: !!python/unicode '{"http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "entries": [{"fqdn_listname": "foo@example.com", "list_id": "foo.example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_name": - "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", "volume": - 1, "display_name": "Foo", "mail_host": "example.com", "member_count": 0}], - "start": 0, "total_size": 1}'} + "total_size": 1, "entries": [{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}], + "start": 0}'} headers: content-length: ['399'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -403,15 +474,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"fqdn_listname": "foo@example.com", "list_id": - "foo.example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_name": "foo", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1, "display_name": "Foo", "mail_host": "example.com", "member_count": - 0}'} + body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": + "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": + 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -426,7 +496,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Wed, 15 Apr 2015 20:00:48 GMT'] + date: ['Fri, 17 Apr 2015 21:06:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/mailman_api_tests/test_subscriptions.py b/src/postorius/tests/mailman_api_tests/test_subscriptions.py new file mode 100644 index 0000000..5216408 --- /dev/null +++ b/src/postorius/tests/mailman_api_tests/test_subscriptions.py @@ -0,0 +1,119 @@ +# -*- 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 . +import logging + +from django.contrib.auth.models import User +from django.core.urlresolvers import reverse +from django.test import Client, TestCase +from django.test.utils import override_settings +from urllib2 import HTTPError + +from postorius.tests import MM_VCR +from postorius.utils import get_client + + +logger = logging.getLogger(__name__) +vcr_log = logging.getLogger('vcr') +vcr_log.setLevel(logging.WARNING) + + +API_CREDENTIALS = {'MAILMAN_API_URL': 'http://localhost:9001', + 'MAILMAN_USER': 'restadmin', + 'MAILMAN_PASS': 'restpass'} + + +@override_settings(**API_CREDENTIALS) +class TestSubscriptionPolicyOpen(TestCase): + """Tests for the list members page. + + Tests permissions and creation of list owners and moderators. + """ + + @MM_VCR.use_cassette('test_list_subscription.yaml') + def setUp(self): + self.client = Client() + try: + self.domain = get_client().create_domain('example.com') + except HTTPError: + self.domain = get_client().get_domain('example.com') + try: + self.test_list = self.domain.create_list('open_list') + except HTTPError: + self.test_list = get_client().get_list('open_list.example.com') + # Set subscription policy to open + settings = self.test_list.settings + settings['subscription_policy'] = 'open' + settings.save() + self.user = User.objects.create_user( + 'testuser', 'test@example.com', 'pwd') + + @MM_VCR.use_cassette('test_list_subscription.yaml') + def tearDown(self): + self.test_list.delete() + self.user.delete() + + @MM_VCR.use_cassette('test_list_subscription.yaml') + def test_subscribing_adds_member(self): + # The subscription goes straight through. + self.client.login(username='testuser', password='pwd') + response = self.client.post( + reverse('list_subscribe', args=('open_list.example.com', )), + {'email': 'fritz@example.org'}) + self.assertEqual(len(self.test_list.members), 1) + self.assertEqual(len(self.test_list.requests), 0) + + +@override_settings(**API_CREDENTIALS) +class TestSubscriptionPolicyModerate(TestCase): + """Tests for the list members page. + + Tests permissions and creation of list owners and moderators. + """ + + @MM_VCR.use_cassette('test_list_subscription_moderate.yaml') + def setUp(self): + self.client = Client() + try: + self.domain = get_client().create_domain('example.com') + except HTTPError: + self.domain = get_client().get_domain('example.com') + try: + self.test_list = self.domain.create_list('moderate_subs') + except HTTPError: + self.test_list = get_client().get_list('moderate_subs.example.com') + # Set subscription policy to open + settings = self.test_list.settings + settings['subscription_policy'] = 'moderate' + settings.save() + # Create django user. + self.user = User.objects.create_user( + 'testuser', 'test@example.com', 'pwd') + + @MM_VCR.use_cassette('test_list_subscription_moderate.yaml') + def tearDown(self): + self.test_list.delete() + self.user.delete() + + @MM_VCR.use_cassette('test_list_subscription_moderate.yaml') + def test_subscribing_adds_member(self): + # The subscription is held for approval. + self.client.login(username='testuser', password='pwd') + response = self.client.post( + reverse('list_subscribe', args=('moderate_subs.example.com', )), + {'email': 'fritz@example.org'}) + self.assertEqual(len(self.test_list.members), 0) + self.assertEqual(len(self.test_list.requests), 1) diff --git a/src/postorius/urls.py b/src/postorius/urls.py index 2698edb..302f300 100644 --- a/src/postorius/urls.py +++ b/src/postorius/urls.py @@ -52,6 +52,12 @@ url(r'^subscriptions$', 'list_subscriptions', name='list_subscriptions'), + url(r'^subscription_requests$', + 'list_subscription_requests', + name='list_subscription_requests'), + url(r'^handle_subscription_request/(?P[^/]+)/(?P[accept|reject|discard|defer]+)$', + 'handle_subscription_request', + name='handle_subscription_request'), url(r'^mass_subscribe/$', ListMassSubscribeView.as_view( ), name='mass_subscribe'), @@ -78,8 +84,7 @@ url(r'^remove/(?P[^/]+)/' '(?P
    [^/]+)', 'remove_role', name='remove_role'), - url(r'^settings/(?P[^/]+)?' - '(?:/(?P.*))?$', + url(r'^settings/(?P[^/]+)?$', 'list_settings', name='list_settings'), url(r'^unsubscribe_all$', diff --git a/src/postorius/views/list.py b/src/postorius/views/list.py index 8919789..f3ef7da 100644 --- a/src/postorius/views/list.py +++ b/src/postorius/views/list.py @@ -192,19 +192,32 @@ class ListSubscribeView(MailingListView): - - """Subscribe a mailing list.""" + """ + view name: `list_subscribe` + """ @method_decorator(login_required) def post(self, request, list_id): + """ + Subscribes an email address to a mailing list via POST and + redirects to the `list_summary` view. + """ try: form = ListSubscribe(request.POST) if form.is_valid(): email = request.POST.get('email') - self.mailing_list.subscribe(email) - messages.success( - request, 'You are subscribed to %s.' % - self.mailing_list.fqdn_listname) + response = self.mailing_list.subscribe( + email, pre_verified=True, pre_confirmed=True) + if type(response) == dict and response.get('token_owner') == \ + 'moderator': + messages.success( + request, + 'Your subscription request has been submitted and is ' + 'waiting for moderator approval.') + else: + messages.success( + request, 'You are subscribed to %s.' % + self.mailing_list.fqdn_listname) else: messages.error(request, 'Something went wrong. ' 'Please try again.') @@ -231,7 +244,7 @@ return utils.render_api_error(request) except ValueError, e: messages.error(request, e) - return redirect('list_members', self.mailing_list.list_id) + return redirect('list_summary', self.mailing_list.list_id) class ListMassSubscribeView(MailingListView): @@ -253,7 +266,8 @@ for email in emails: try: validate_email(email) - self.mailing_list.subscribe(address=email) + self.mailing_list.subscribe(address=email, pre_verified=True, + pre_confirmed=True) messages.success( request, 'The address %s has been subscribed to %s.' % @@ -613,9 +627,70 @@ return redirect('list_held_messages', the_list.list_id) +@list_moderator_required +def list_subscription_requests(request, list_id): + """Shows a list of held messages. + """ + try: + m_list = utils.get_client().get_list(list_id) + except MailmanApiError: + return utils.render_api_error(request) + return render_to_response('postorius/lists/subscription_requests.html', + {'list': m_list}, + context_instance=RequestContext(request)) + + +@list_moderator_required +def handle_subscription_request(request, list_id, request_id, action): + """ + Handle a subscription request. Possible actions: + - accept + - defer + - reject + - discard + """ + confirmation_messages = { + 'accept': _('The request has been accepted.'), + 'reject': _('The request has been rejected.'), + 'discard': _('The request has been discarded.'), + 'defer': _('The request has been defered.'), + } + try: + m_list = utils.get_client().get_list(list_id) + # Moderate request and add feedback message to session. + m_list.moderate_request(request_id, action) + messages.success(request, confirmation_messages[action]) + except MailmanApiError: + return utils.render_api_error(request) + except HTTPError as e: + messages.error(request, '{0}: {1}'.format( + _('The request could not be moderated'), e.reason)) + return redirect('list_subscription_requests', m_list.list_id) + + +SETTINGS_SECTION_NAMES = ( + ('list_identity', _('List Identity')), + ('automatic_responses', _('Automatic Responses')), + ('alter_messages', _('Alter Messages')), + ('digest', _('Digest')), + ('message_acceptance', _('Message Acceptance')), + ('archiving', _('Archiving')), + ('subscription_policy', _('Subscription Policy')), +) + +SETTINGS_FORMS = { + 'list_identity': ListIdentityForm, + 'automatic_responses': ListAutomaticResponsesForm, + 'alter_messages': AlterMessagesForm, + 'digest': DigestSettingsForm, + 'message_acceptance': MessageAcceptanceForm, + 'archiving': ArchivePolicySettingsForm, + 'subscription_policy': ListSubscriptionPolicyForm, +} + + @list_owner_required def list_settings(request, list_id=None, visible_section=None, - visible_option=None, template='postorius/lists/settings.html'): """ View and edit the settings of a list. @@ -629,55 +704,36 @@ """ message = "" if visible_section is None: - visible_section = 'List Identity' - form_sections = [] + visible_section = 'list_identity' + form_class = SETTINGS_FORMS.get(visible_section) try: - the_list = List.objects.get_or_404(fqdn_listname=list_id) - except MailmanApiError: + m_list = List.objects.get_or_404(fqdn_listname=list_id) + list_settings = m_list.settings + except MailmanApiError, HTTPError: return utils.render_api_error(request) - # collect all Form sections for the links: - temp = ListSettings('', '') - for section in temp.layout: - try: - form_sections.append((section[0], - temp.section_descriptions[section[0]])) - except KeyError: - pass - del temp - # Save a Form Processed by POST - if request.method == 'POST': - form = ListSettings(visible_section, visible_option, data=request.POST) - form.truncate() - if form.is_valid(): - list_settings = the_list.settings - for key in form.fields.keys(): - list_settings[key] = form.cleaned_data[key] - list_settings.save() - message = _("The list settings have been updated.") + # List settings are grouped an processed in different forms. + if form_class: + if request.method == 'POST': + form = form_class(request.POST) + if form.is_valid(): + try: + for key in form.fields.keys(): + list_settings[key] = form.cleaned_data[key] + list_settings.save() + messages.success(request, + _('The settings have been updated.')) + except HTTPError as e: + messages.error( + request, + '{0}: {1}'.format(_('An error occured'), e.reason)) else: - message = _( - "Validation Error - The list settings have not been updated.") - else: - # Provide a form with existing values - # create form and process layout into form.layout - form = ListSettings(visible_section, visible_option, data=None) - # create a Dict of all settings which are used in the form - used_settings = {} - for section in form.layout: - for option in section[1:]: - used_settings[option] = the_list.settings[option] - if option == u'acceptable_aliases': - used_settings[option] = '\n'.join(used_settings[option]) - # recreate the form using the settings - form = ListSettings(visible_section, visible_option, - data=used_settings) - form.truncate() + form = form_class(initial=list_settings) + return render_to_response(template, {'form': form, - 'form_sections': form_sections, + 'section_names': SETTINGS_SECTION_NAMES, 'message': message, - 'list': the_list, - 'visible_option': visible_option, + 'list': m_list, 'visible_section': visible_section}, context_instance=RequestContext(request)) diff --git a/tox.ini b/tox.ini index bb2acfd..84f3749 100644 --- a/tox.ini +++ b/tox.ini @@ -23,3 +23,33 @@ POSTORIUS_VCR_RECORD_MODE = all commands = django-admin.py test --settings=testing.test_settings {posargs:postorius} + + +# These are used for local development and expect mailman.client to be +# sitting in a directory next to this one. +[testenv:dev] +usedevelop = True +basepython = python2.7 +deps = + -rdev-requirements.txt + Django==1.8 +setenv = + PYTHONPATH = {toxinidir} +commands = + # Install mailman.client from local repo instead of from pypi + pip install -e ../mailman.client + django-admin.py test --settings=testing.test_settings {posargs:postorius} + +[testenv:dev-record] +usedevelop = True +basepython = python2.7 +deps = + -rdev-requirements.txt + Django==1.8 +setenv = + PYTHONPATH = {toxinidir} + POSTORIUS_VCR_RECORD_MODE = all +commands = + # Install mailman.client from local repo instead of from pypi + pip install -e ../mailman.client + django-admin.py test --settings=testing.test_settings {posargs:postorius}