diff --git a/src/postorius/forms.py b/src/postorius/forms.py index 658a178..39f940e 100644 --- a/src/postorius/forms.py +++ b/src/postorius/forms.py @@ -95,20 +95,9 @@ "description"]] -class NewOwnerForm(forms.Form): - - """Add a list owner.""" - owner_email = forms.EmailField( - label=_('Email Address'), - error_messages={ - 'required': _('Please enter an email adddress.'), - 'invalid': _('Please enter a valid email adddress.')}) - - -class NewModeratorForm(forms.Form): - - """Add a list moderator.""" - moderator_email = forms.EmailField( +class MemberForm(forms.Form): + """Assing a role to the member""" + email = forms.EmailField( label=_('Email Address'), error_messages={ 'required': _('Please enter an email adddress.'), @@ -853,18 +842,18 @@ choices=((address, address) for address in user_emails)) -class HeldMessagesModerationForm(forms.Form): +class MultipleChoiceForm(forms.Form): - class HeldMessageMultipleChoiceField(forms.MultipleChoiceField): + class MultipleChoiceField(forms.MultipleChoiceField): def validate(self, value): pass - choices = HeldMessageMultipleChoiceField( + choices = MultipleChoiceField( widget=forms.CheckboxSelectMultiple, ) def clean_choices(self): if len(self.cleaned_data['choices']) < 1: - raise forms.ValidationError(_('Please select at least one message to perform an action')) + raise forms.ValidationError(_('Make at least one selection')) return self.cleaned_data['choices'] diff --git a/src/postorius/templates/postorius/base.html b/src/postorius/templates/postorius/base.html index 5ce979f..7cee8f8 100644 --- a/src/postorius/templates/postorius/base.html +++ b/src/postorius/templates/postorius/base.html @@ -1,4 +1,3 @@ -{% load url from future %} {% load i18n %} {% load staticfiles %} diff --git a/src/postorius/templates/postorius/lists/confirm_remove_role.html b/src/postorius/templates/postorius/lists/confirm_remove_role.html index 4d7cfae..816fcb5 100644 --- a/src/postorius/templates/postorius/lists/confirm_remove_role.html +++ b/src/postorius/templates/postorius/lists/confirm_remove_role.html @@ -15,7 +15,7 @@
{% csrf_token %} - {% trans 'Cancel' %} + {% trans 'Cancel' %}
diff --git a/src/postorius/templates/postorius/lists/members.html b/src/postorius/templates/postorius/lists/members.html index 6ab9b7f..ed0d4d3 100644 --- a/src/postorius/templates/postorius/lists/members.html +++ b/src/postorius/templates/postorius/lists/members.html @@ -4,99 +4,89 @@ {% load nav_helpers %} {% block subtitle %} -{% trans 'Members' %} | {{ list.fqdn_listname}} +{{ page_title }} | {{ list.fqdn_listname}} {% endblock %} {% block main %} {% list_nav 'list_members' 'List Members' %}
-

{% trans 'List Members' %}

+

{{ page_title }}

-

{% trans 'Owners' %}

-
- {% csrf_token %} - {% if owner_form.owner_email.errors %} -
{{ owner_form.owner_email.errors }}
+ {% if not member_form %} +
+ + + {% csrf_token %} + + +
+ {% else %} + {% if member_form.email.errors %} +
+ {{ member_form.email.errors }} +
{% endif %} - - {{ owner_form.owner_email|add_form_control }} - - -
-
- - - - - - - - - {% for member in list.owners %} - - - - - {% endfor %} - -
{% trans 'Address' %} 
{{ member }}{% trans 'Delete' %}
-
-

{% trans 'Moderators' %}

-
- {% csrf_token %} - {% if moderator_form.moderator_email.errors %} -
{{ moderator_form.moderator_email.errors }}
- {% endif %} - - {{ moderator_form.moderator_email|add_form_control }} - -
-
-
- - - - - - - - - {% for member in list.moderators %} - - - - - {% endfor %} - -
{% trans 'Address' %} 
{{ member }}{% trans 'Delete' %}
-
-

{% trans 'Members' %}

-
- {% csrf_token %} - + + {% csrf_token %} + {{ member_form.email.label_tag }} + {{ member_form.email|add_form_control }} +
-
-
- - - - - - - - - - {% for member in members %} - - - - - - {% endfor %} - -
{% trans 'Address' %}{% trans 'Role' %} 
{{ member.email }}{% trans member.role %}{% trans 'Unsubscribe' %}
-
- {% include 'postorius/_pagination.html' with page=members %} + {% endif %} +
+ {% if members|length > 0 %} +
+ {% csrf_token %} + {% if form.choices.errors %} +
{{ form.choices.errors }}
+ {% endif %} +
+ + + + {% if not member_form %} + + {% endif %} + + + + + + {% for member in members %} + + {% if not member_form %} + + + + {% else %} + + + {% endif %} + + {% endfor %} + +
{% trans 'Address' %} + {% if not member_form %} + + {% endif %} +
{{ member.email }}{% trans 'Unsubscribe' %}{{ member }}{% trans 'Delete' %}
+
+
+ {% if not member_form %} + {% include 'postorius/_pagination.html' with page=members %} + {% endif %} + {% else %} +

{{ empty_error }}

+ {% endif %}
{% endblock main %} +{% block additionaljs %} + +{% endblock %} diff --git a/src/postorius/templates/postorius/menu/list_nav.html b/src/postorius/templates/postorius/menu/list_nav.html index 155b7a4..bc3ea1a 100644 --- a/src/postorius/templates/postorius/menu/list_nav.html +++ b/src/postorius/templates/postorius/menu/list_nav.html @@ -20,7 +20,16 @@ {% endif %} {% if user.is_superuser or user.is_list_owner %} - + 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 acfffd3..49ccd26 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml @@ -71,7 +71,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -81,10 +81,10 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1062'] + location: ['http://localhost:9001/3.0/members/1211'] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&role=moderator&list_id=foo.example.com + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -94,7 +94,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1063'] + location: ['http://localhost:9001/3.0/members/1212'] status: {code: 201, message: Created} - request: body: null @@ -179,7 +179,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -189,10 +189,10 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1064'] + location: ['http://localhost:9001/3.0/members/1213'] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&role=moderator&list_id=foo.example.com + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -202,7 +202,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1065'] + location: ['http://localhost:9001/3.0/members/1214'] status: {code: 201, message: Created} - request: body: null @@ -287,7 +287,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -297,10 +297,10 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1066'] + location: ['http://localhost:9001/3.0/members/1215'] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&role=moderator&list_id=foo.example.com + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -310,7 +310,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1067'] + location: ['http://localhost:9001/3.0/members/1216'] status: {code: 201, message: Created} - request: body: null @@ -395,7 +395,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -405,10 +405,10 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1068'] + location: ['http://localhost:9001/3.0/members/1217'] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&role=moderator&list_id=foo.example.com + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -418,7 +418,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1069'] + location: ['http://localhost:9001/3.0/members/1218'] status: {code: 201, message: Created} - request: body: null @@ -455,10 +455,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"2e2caefd97aec00836f21b3ba6233dbde0652443\"", - "list_id": "foo.example.com", "member_id": 1068, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1068", "user": "http://localhost:9001/3.0/users/721"}], - "http_etag": "\"b7bac46940cd4396c235766b4e0965a5565567e4\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"1add52760423b1948a511cd6eca07ad20f748dca\"", + "list_id": "foo.example.com", "member_id": 1217, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1217", "user": "http://localhost:9001/3.0/users/832"}], + "http_etag": "\"67eeb0135bc4bce4705d422e6ace819d75b4a044\"", "start": 0, "total_size": 1}'} headers: content-length: ['460'] @@ -468,23 +468,6 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"9a9d1568f1cca82aceb8ac008100e82b50b53a2b\"", "list_id": "foo.example.com", - "member_id": 1069, "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1069", - "user": "http://localhost:9001/3.0/users/722"}], "http_etag": "\"fd63413c7ef0962da0a1b1727d5aa2597f5583a6\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['472'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE uri: http://localhost:9001/3.0/lists/foo@example.com response: @@ -564,7 +547,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -574,10 +557,10 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1070'] + location: ['http://localhost:9001/3.0/members/1219'] status: {code: 201, message: Created} - request: - body: subscriber=moderator%40example.com&role=moderator&list_id=foo.example.com + body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -587,27 +570,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1071'] + location: ['http://localhost:9001/3.0/members/1220'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE uri: http://localhost:9001/3.0/lists/foo@example.com response: 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 31e28a9..e10097b 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml @@ -22,8 +22,8 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0f06a596368f3735b71d2d3a267630745581782\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/722", "user_id": 722}'} + "\"2af1f94331910955062fa2e246301bf2231f768e\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/833", "user_id": 833}'} headers: content-length: ['192'] content-type: [application/json; charset=utf-8] @@ -33,13 +33,13 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/722/addresses + uri: http://localhost:9001/3.0/users/833/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"c6a4869dbb94a88186408cd2e9f33a08a8197fc9\"", "original_email": + "http_etag": "\"a26dcf7ea7a5d4b2afc129ff0de8e025ca55b5ba\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/722"}], - "http_etag": "\"3165fbeebcf28809e7c3b681174aa52ae7008aaf\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/833"}], + "http_etag": "\"3cee023832a8558e156964e4e6f4b4005614abd2\"", "start": 0, "total_size": 1}'} headers: content-length: ['404'] @@ -53,9 +53,9 @@ uri: http://localhost:9001/3.0/addresses/moderator@example.com response: body: {string: !!python/unicode '{"email": "moderator@example.com", "http_etag": - "\"c6a4869dbb94a88186408cd2e9f33a08a8197fc9\"", "original_email": "moderator@example.com", + "\"a26dcf7ea7a5d4b2afc129ff0de8e025ca55b5ba\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/moderator@example.com", - "user": "http://localhost:9001/3.0/users/722"}'} + "user": "http://localhost:9001/3.0/users/833"}'} headers: content-length: ['299'] content-type: [application/json; charset=utf-8] @@ -68,10 +68,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"434be7154b2958907148bfe9a94777b813220f0a\"", - "list_id": "foo.example.com", "member_id": 1062, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1062", "user": "http://localhost:9001/3.0/users/721"}], - "http_etag": "\"de782d5fff7aa3120557f7634f4520c0a1d35fa6\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"9e714abb7f8f20545e570682b4e16e602f9d51fe\"", + "list_id": "foo.example.com", "member_id": 1211, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1211", "user": "http://localhost:9001/3.0/users/832"}], + "http_etag": "\"3339423d1dece5b7fe69fba0ccfe2c5d64d471a5\"", "start": 0, "total_size": 1}'} headers: content-length: ['460'] @@ -82,23 +82,6 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"07f792647bb5ba09b7c0b0893268d49e4f366e51\"", "list_id": "foo.example.com", - "member_id": 1063, "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1063", - "user": "http://localhost:9001/3.0/users/722"}], "http_etag": "\"c809c06988c88cd46c60eae4823070f5043a7934\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['472'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo@example.com response: body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", @@ -117,8 +100,8 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f206325454526c0a6fdc5973a6347af757e9210e\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/721", "user_id": 721}'} + "\"cfceb1eb2d3a2543bb402dc62f8471da5e8878ee\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/832", "user_id": 832}'} headers: content-length: ['192'] content-type: [application/json; charset=utf-8] @@ -128,12 +111,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/721/addresses + uri: http://localhost:9001/3.0/users/832/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"a4461ee2fa89e7ad435613eec55609b343f456af\"", "original_email": "owner@example.com", + "\"152488d07d16aaa6f539300ed94be0ee90e1be6f\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", - "user": "http://localhost:9001/3.0/users/721"}], "http_etag": "\"6314318bdc10678ff38b184ceacb6579cfd1ab57\"", + "user": "http://localhost:9001/3.0/users/832"}], "http_etag": "\"4692cd8da3c2a778ec0a2d954dc5dcf74e50df43\"", "start": 0, "total_size": 1}'} headers: content-length: ['392'] @@ -146,10 +129,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/owner@example.com response: - body: {string: !!python/unicode '{"email": "owner@example.com", "http_etag": "\"a4461ee2fa89e7ad435613eec55609b343f456af\"", + body: {string: !!python/unicode '{"email": "owner@example.com", "http_etag": "\"152488d07d16aaa6f539300ed94be0ee90e1be6f\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", "user": - "http://localhost:9001/3.0/users/721"}'} + "http://localhost:9001/3.0/users/832"}'} headers: content-length: ['287'] content-type: [application/json; charset=utf-8] @@ -162,10 +145,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"56afc31ca548fc3e56bceaed587e71fd702aa5a4\"", - "list_id": "foo.example.com", "member_id": 1064, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1064", "user": "http://localhost:9001/3.0/users/721"}], - "http_etag": "\"60caf9ca79c993abc8e9eaabec3656ee56a105e0\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"9ee3e2dc848b75d58a9441e5a98cd960e833584d\"", + "list_id": "foo.example.com", "member_id": 1213, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1213", "user": "http://localhost:9001/3.0/users/832"}], + "http_etag": "\"c6509fce32e96b2d15cf654387cd2b60df22431e\"", "start": 0, "total_size": 1}'} headers: content-length: ['460'] @@ -176,83 +159,6 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"93a1fefd02bb3f34878729964be9e8459e011483\"", "list_id": "foo.example.com", - "member_id": 1065, "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1065", - "user": "http://localhost:9001/3.0/users/722"}], "http_etag": "\"aa1f7831b6026bf145ac0090abec10508c947635\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['472'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1 - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"56afc31ca548fc3e56bceaed587e71fd702aa5a4\"", - "list_id": "foo.example.com", "member_id": 1064, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1064", "user": "http://localhost:9001/3.0/users/721"}], - "http_etag": "\"60caf9ca79c993abc8e9eaabec3656ee56a105e0\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['460'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"93a1fefd02bb3f34878729964be9e8459e011483\"", "list_id": "foo.example.com", - "member_id": 1065, "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1065", - "user": "http://localhost:9001/3.0/users/722"}], "http_etag": "\"aa1f7831b6026bf145ac0090abec10508c947635\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['472'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo@example.com response: body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", @@ -268,85 +174,6 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/su@example.com - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f3ae14975cc188a94c91842fc7474da4c2f8b1dd\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/718", "user_id": 718}'} - headers: - content-length: ['192'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/718/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"f3c90224dfc2b451d7ce91be4f12d72b1d25822b\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/718"}], "http_etag": "\"bdc70f878525ca6c9a5cccc82a4e3f9a008dc77a\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['383'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/addresses/su@example.com - response: - body: {string: !!python/unicode '{"email": "su@example.com", "http_etag": "\"f3c90224dfc2b451d7ce91be4f12d72b1d25822b\"", - "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", - "self_link": "http://localhost:9001/3.0/addresses/su@example.com", "user": - "http://localhost:9001/3.0/users/718"}'} - headers: - content-length: ['278'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"1d4af4945aafefe7e5d34a913e3d5bdcde6c472a\"", - "list_id": "foo.example.com", "member_id": 1066, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1066", "user": "http://localhost:9001/3.0/users/721"}], - "http_etag": "\"f89ab4265b4ef2989a3a2b2d51a72e3c74e1ecc3\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['460'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"8d32135df22827d0d16cc457dd969fb5fa63a1c8\"", "list_id": "foo.example.com", - "member_id": 1067, "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1067", - "user": "http://localhost:9001/3.0/users/722"}], "http_etag": "\"76d3f79bec07dab0f7f6ee4faec636f104e3ab1c\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['472'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1 response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", @@ -373,16 +200,14 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner + uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"1d4af4945aafefe7e5d34a913e3d5bdcde6c472a\"", - "list_id": "foo.example.com", "member_id": 1066, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1066", "user": "http://localhost:9001/3.0/users/721"}], - "http_etag": "\"f89ab4265b4ef2989a3a2b2d51a72e3c74e1ecc3\"", "start": 0, "total_size": - 1}'} + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} headers: - content-length: ['460'] + content-length: ['294'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -390,16 +215,25 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator + uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1 response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"8d32135df22827d0d16cc457dd969fb5fa63a1c8\"", "list_id": "foo.example.com", - "member_id": 1067, "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1067", - "user": "http://localhost:9001/3.0/users/722"}], "http_etag": "\"76d3f79bec07dab0f7f6ee4faec636f104e3ab1c\"", - "start": 0, "total_size": 1}'} + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} headers: - content-length: ['472'] + content-length: ['90'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 + response: + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} + headers: + content-length: ['90'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml index 0fc466f..d71aa0c 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml @@ -15,15 +15,15 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=test%40example.com&display_name=None&list_id=foo.example.com + body: display_name=None&list_id=foo.example.com&subscriber=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST uri: http://localhost:9001/3.0/members response: - body: {string: !!python/unicode '{"http_etag": "\"89e239d266b1828bfc170ffeb73dd2eb71795646\"", - "token": "006b54a8299bc2d8cbb45f2455b9d57c366dbf6b", "token_owner": "subscriber"}'} + body: {string: !!python/unicode '{"http_etag": "\"f596235f95af3b020d0a73b5d2b8d5182dea19ac\"", + "token": "1564e97a05bada970f02a469147598c8f840dabc", "token_owner": "subscriber"}'} headers: content-length: ['143'] content-type: [application/json; charset=utf-8] @@ -36,8 +36,8 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "display_name": - "None", "http_etag": "\"41efc9e9766b57122fcfc47a7f238f992794c501\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/732", "user_id": 732}'} + "None", "http_etag": "\"7d5ccba2da3e56c767082bd5d560dc357515bd2c\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/841", "user_id": 841}'} headers: content-length: ['216'] content-type: [application/json; charset=utf-8] @@ -48,7 +48,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/732/addresses + uri: http://localhost:9001/3.0/users/841/addresses response: body: {string: !!python/unicode ''} headers: @@ -89,8 +89,8 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "display_name": - "None", "http_etag": "\"41efc9e9766b57122fcfc47a7f238f992794c501\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/732", "user_id": 732}'} + "None", "http_etag": "\"7d5ccba2da3e56c767082bd5d560dc357515bd2c\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/841", "user_id": 841}'} headers: content-length: ['216'] content-type: [application/json; charset=utf-8] @@ -100,16 +100,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/732/addresses + uri: http://localhost:9001/3.0/users/841/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "anotheremail@example.com", - "http_etag": "\"7156d8ec3024db9741530e1efc4fead0ccdb47f4\"", "original_email": + "http_etag": "\"f8c9d1a99a990fd3e8553ef935bdedc03a22492e\"", "original_email": "anotheremail@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/732", + "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/841", "verified_on": "2005-08-01T07:49:23"}, {"display_name": "None", "email": "test@example.com", - "http_etag": "\"11dd5a3e6f450a0d39ff0171ae7e2397e5cfd02e\"", "original_email": + "http_etag": "\"9501f9ae90b6f454acc28e202463d2baad826e52\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/732"}], "http_etag": "\"8574ca48f5ee3221235cb194fdfc4e58b94f84b1\"", + "user": "http://localhost:9001/3.0/users/841"}], "http_etag": "\"c34bf4c9a8e928ba2be6079f7f414fe9a02d4063\"", "start": 0, "total_size": 2}'} headers: content-length: ['761'] @@ -123,9 +123,9 @@ uri: http://localhost:9001/3.0/addresses/anotheremail@example.com response: body: {string: !!python/unicode '{"email": "anotheremail@example.com", "http_etag": - "\"7156d8ec3024db9741530e1efc4fead0ccdb47f4\"", "original_email": "anotheremail@example.com", + "\"f8c9d1a99a990fd3e8553ef935bdedc03a22492e\"", "original_email": "anotheremail@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/anotheremail@example.com", - "user": "http://localhost:9001/3.0/users/732", "verified_on": "2005-08-01T07:49:23"}'} + "user": "http://localhost:9001/3.0/users/841", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['346'] content-type: [application/json; charset=utf-8] @@ -138,9 +138,9 @@ uri: http://localhost:9001/3.0/addresses/test@example.com response: body: {string: !!python/unicode '{"display_name": "None", "email": "test@example.com", - "http_etag": "\"11dd5a3e6f450a0d39ff0171ae7e2397e5cfd02e\"", "original_email": + "http_etag": "\"9501f9ae90b6f454acc28e202463d2baad826e52\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/732"}'} + "user": "http://localhost:9001/3.0/users/841"}'} headers: content-length: ['308'] content-type: [application/json; charset=utf-8] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml index 0113046..a432718 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml @@ -15,7 +15,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=test%40example.com&pre_confirmed=True&pre_verified=True&display_name=None&list_id=foo.example.com + body: display_name=None&pre_confirmed=True&list_id=foo.example.com&subscriber=test%40example.com&pre_verified=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -25,7 +25,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1073'] + location: ['http://localhost:9001/3.0/members/1222'] status: {code: 201, message: Created} - request: body: null @@ -50,8 +50,8 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "display_name": - "None", "http_etag": "\"2e7ffc36f680e19d93e21c7c7992d6cb1e6351b6\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/725", "user_id": 725}'} + "None", "http_etag": "\"cbf776336bf50ffb5be6bb1f12bf5fdd88b3667c\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/836", "user_id": 836}'} headers: content-length: ['216'] content-type: [application/json; charset=utf-8] @@ -61,14 +61,14 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/725/addresses + uri: http://localhost:9001/3.0/users/836/addresses response: body: {string: !!python/unicode '{"entries": [{"display_name": "None", "email": - "test@example.com", "http_etag": "\"95168435f4958d498685533cd0a9aea118579ef2\"", + "test@example.com", "http_etag": "\"1514e685d645354d4e6b6074adf869579db0844b\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/725", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"b9774637c895ed8a2307e5ddb6e9591d7c655cae\"", "start": 0, "total_size": + "http://localhost:9001/3.0/users/836", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"abcb8a44075710ac7debac5b207f33e1f973e3ce\"", "start": 0, "total_size": 1}'} headers: content-length: ['451'] @@ -82,9 +82,9 @@ uri: http://localhost:9001/3.0/addresses/test@example.com response: body: {string: !!python/unicode '{"display_name": "None", "email": "test@example.com", - "http_etag": "\"95168435f4958d498685533cd0a9aea118579ef2\"", "original_email": + "http_etag": "\"1514e685d645354d4e6b6074adf869579db0844b\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/725", "verified_on": "2005-08-01T07:49:23"}'} + "user": "http://localhost:9001/3.0/users/836", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['346'] content-type: [application/json; charset=utf-8] @@ -123,9 +123,9 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/member/test@example.com response: body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"5d6b189413a7b3618ffa8942edcf5cc83a855f51\"", - "list_id": "foo.example.com", "member_id": 1073, "role": "member", "self_link": - "http://localhost:9001/3.0/members/1073", "user": "http://localhost:9001/3.0/users/725"}'} + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"2320cbe55582af3155cc47ac635a440fe668fa6d\"", + "list_id": "foo.example.com", "member_id": 1222, "role": "member", "self_link": + "http://localhost:9001/3.0/members/1222", "user": "http://localhost:9001/3.0/users/836"}'} headers: content-length: ['354'] content-type: [application/json; charset=utf-8] 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 99d2901..8d0dcfa 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 @@ -7,26 +7,11 @@ method: !!python/unicode POST uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode 'Duplicate email host: example.com'} + body: {string: !!python/unicode ''} headers: - content-length: ['33'] - content-type: [application/json; charset=utf-8] - status: {code: 400, message: Bad Request} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + content-length: ['0'] + location: ['http://localhost:9001/3.0/domains/example.com'] + status: {code: 201, message: Created} - request: body: null headers: 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 0fe100f..44d5dbb 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 @@ -29,7 +29,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: mail-archive=False&prototype=True&mhonarc=True + body: prototype=True&mhonarc=True&mail-archive=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] 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 ce832d4..b541b98 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 @@ -29,7 +29,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: mail-archive=True&prototype=True&mhonarc=True + body: prototype=True&mhonarc=True&mail-archive=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -41,7 +41,7 @@ content-length: ['0'] status: {code: 204, message: No Content} - request: - body: mail-archive=True&prototype=False&mhonarc=True + body: prototype=False&mhonarc=True&mail-archive=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -53,7 +53,7 @@ content-length: ['0'] status: {code: 204, message: No Content} - request: - body: mail-archive=True&prototype=False&mhonarc=False + body: prototype=False&mhonarc=False&mail-archive=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] 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 827a883..93b2d0b 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml @@ -118,7 +118,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=owner%40example.com&role=owner&list_id=a_new_list.example.com + body: role=owner&list_id=a_new_list.example.com&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -128,7 +128,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1072'] + location: ['http://localhost:9001/3.0/members/1221'] status: {code: 201, message: Created} - request: body: null @@ -163,7 +163,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=A+new+list.&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=A_new_list&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BA_new_list%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=confirm + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=A_new_list&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BA_new_list%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=confirm&allow_list_posts=True&description=A+new+list.&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -198,10 +198,10 @@ uri: http://localhost:9001/3.0/lists/a_new_list.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ef1299745a1acba735c33ed96962c09c62b36284\"", - "list_id": "a_new_list.example.com", "member_id": 1072, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1072", "user": "http://localhost:9001/3.0/users/724"}], - "http_etag": "\"9bf5e42c7356ae65e0be758dd843eaf7a6d730e9\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"50d06c4fdb47ceb4848b7d9391d10935023bbdb3\"", + "list_id": "a_new_list.example.com", "member_id": 1221, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1221", "user": "http://localhost:9001/3.0/users/835"}], + "http_etag": "\"800267eff08c22b90a46683c4cc900236ea48a7f\"", "start": 0, "total_size": 1}'} headers: content-length: ['467'] 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 7152d70..67f5345 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 @@ -71,45 +71,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/su@example.com - response: - body: {string: !!python/unicode 404 Not Found} - headers: - content-length: ['13'] - content-type: [application/json; charset=utf-8] - status: {code: 404, message: Not Found} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: subscriber=newmod%40example.com&role=moderator&list_id=foo.example.com + body: role=moderator&list_id=foo.example.com&subscriber=newmod%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -119,59 +81,20 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1054'] + location: ['http://localhost:9001/3.0/members/1203'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1 - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newmod@example.com", - "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"c3fe25f1c9583e2b9a0c66e60cab9d60a8267fc0\"", - "list_id": "foo.example.com", "member_id": 1054, "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/1054", "user": "http://localhost:9001/3.0/users/717"}], - "http_etag": "\"4e44c3bf09967ae365b4fad262ceaccd5a1ce7b4\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"648df91720dccf80846c3317eaf1a2db89898609\"", + "list_id": "foo.example.com", "member_id": 1203, "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/1203", "user": "http://localhost:9001/3.0/users/828"}], + "http_etag": "\"2b9f083e7debb47095e40df57eb41429767bfca5\"", "start": 0, "total_size": 1}'} headers: content-length: ['466'] @@ -185,10 +108,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newmod@example.com", - "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"c3fe25f1c9583e2b9a0c66e60cab9d60a8267fc0\"", - "list_id": "foo.example.com", "member_id": 1054, "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/1054", "user": "http://localhost:9001/3.0/users/717"}], - "http_etag": "\"4e44c3bf09967ae365b4fad262ceaccd5a1ce7b4\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"648df91720dccf80846c3317eaf1a2db89898609\"", + "list_id": "foo.example.com", "member_id": 1203, "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/1203", "user": "http://localhost:9001/3.0/users/828"}], + "http_etag": "\"2b9f083e7debb47095e40df57eb41429767bfca5\"", "start": 0, "total_size": 1}'} headers: content-length: ['466'] 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 c649310..b97a51e 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 @@ -7,10 +7,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newmod@example.com", - "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"c3fe25f1c9583e2b9a0c66e60cab9d60a8267fc0\"", - "list_id": "foo.example.com", "member_id": 1054, "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/1054", "user": "http://localhost:9001/3.0/users/717"}], - "http_etag": "\"4e44c3bf09967ae365b4fad262ceaccd5a1ce7b4\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"648df91720dccf80846c3317eaf1a2db89898609\"", + "list_id": "foo.example.com", "member_id": 1203, "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/1203", "user": "http://localhost:9001/3.0/users/828"}], + "http_etag": "\"2b9f083e7debb47095e40df57eb41429767bfca5\"", "start": 0, "total_size": 1}'} headers: content-length: ['466'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner.yaml index ab9437f..8fe338b 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner.yaml @@ -71,7 +71,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=su%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=su%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -81,7 +81,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1055'] + location: ['http://localhost:9001/3.0/members/1204'] status: {code: 201, message: Created} - request: body: null @@ -181,7 +181,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=su%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=su%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -191,7 +191,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1057'] + location: ['http://localhost:9001/3.0/members/1206'] status: {code: 201, message: Created} - request: body: null @@ -291,7 +291,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=su%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=su%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -301,7 +301,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1060'] + location: ['http://localhost:9001/3.0/members/1209'] status: {code: 201, message: Created} - request: body: null diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_add_remove.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_add_remove.yaml index f65e6c4..0ddeb3d 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_add_remove.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_add_remove.yaml @@ -15,82 +15,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/su@example.com - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f3ae14975cc188a94c91842fc7474da4c2f8b1dd\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/718", "user_id": 718}'} - headers: - content-length: ['192'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/718/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"f3c90224dfc2b451d7ce91be4f12d72b1d25822b\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/718"}], "http_etag": "\"bdc70f878525ca6c9a5cccc82a4e3f9a008dc77a\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['383'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/addresses/su@example.com - response: - body: {string: !!python/unicode '{"email": "su@example.com", "http_etag": "\"f3c90224dfc2b451d7ce91be4f12d72b1d25822b\"", - "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", - "self_link": "http://localhost:9001/3.0/addresses/su@example.com", "user": - "http://localhost:9001/3.0/users/718"}'} - headers: - content-length: ['278'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"e94f9260c5e5e3fac5cf12b8e80629e57b657ce7\"", - "list_id": "foo.example.com", "member_id": 1055, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1055", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"536e839d0f3b3595b962604a3c758bf2e061e531\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['454'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: subscriber=newowner%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=newowner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -100,50 +25,24 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1056'] + location: ['http://localhost:9001/3.0/members/1205'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1 - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"15ea02b1533d2632421e4836590b51d07b2c41cb\"", "list_id": "foo.example.com", - "member_id": 1056, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1056", - "user": "http://localhost:9001/3.0/users/719"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"e94f9260c5e5e3fac5cf12b8e80629e57b657ce7\"", - "list_id": "foo.example.com", "member_id": 1055, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1055", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"cc33901d1469be83133bba510a18cada49098453\"", "start": 0, "total_size": + "\"33e8f2b1a30f2a747a371d5c4b67010f09d29ef2\"", "list_id": "foo.example.com", + "member_id": 1205, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1205", + "user": "http://localhost:9001/3.0/users/830"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"e13494fb75dda50aeceae50b5830a191d60b0cda\"", + "list_id": "foo.example.com", "member_id": 1204, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1204", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"0848f295c429b5659e5d6acadbc7ad0d200934b7\"", "start": 0, "total_size": 2}'} headers: content-length: ['817'] @@ -154,30 +53,17 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"15ea02b1533d2632421e4836590b51d07b2c41cb\"", "list_id": "foo.example.com", - "member_id": 1056, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1056", - "user": "http://localhost:9001/3.0/users/719"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"e94f9260c5e5e3fac5cf12b8e80629e57b657ce7\"", - "list_id": "foo.example.com", "member_id": 1055, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1055", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"cc33901d1469be83133bba510a18cada49098453\"", "start": 0, "total_size": + "\"33e8f2b1a30f2a747a371d5c4b67010f09d29ef2\"", "list_id": "foo.example.com", + "member_id": 1205, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1205", + "user": "http://localhost:9001/3.0/users/830"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"e13494fb75dda50aeceae50b5830a191d60b0cda\"", + "list_id": "foo.example.com", "member_id": 1204, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1204", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"0848f295c429b5659e5d6acadbc7ad0d200934b7\"", "start": 0, "total_size": 2}'} headers: content-length: ['817'] @@ -207,13 +93,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"15ea02b1533d2632421e4836590b51d07b2c41cb\"", "list_id": "foo.example.com", - "member_id": 1056, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1056", - "user": "http://localhost:9001/3.0/users/719"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"e94f9260c5e5e3fac5cf12b8e80629e57b657ce7\"", - "list_id": "foo.example.com", "member_id": 1055, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1055", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"cc33901d1469be83133bba510a18cada49098453\"", "start": 0, "total_size": + "\"33e8f2b1a30f2a747a371d5c4b67010f09d29ef2\"", "list_id": "foo.example.com", + "member_id": 1205, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1205", + "user": "http://localhost:9001/3.0/users/830"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"e13494fb75dda50aeceae50b5830a191d60b0cda\"", + "list_id": "foo.example.com", "member_id": 1204, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1204", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"0848f295c429b5659e5d6acadbc7ad0d200934b7\"", "start": 0, "total_size": 2}'} headers: content-length: ['817'] @@ -238,10 +124,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"e94f9260c5e5e3fac5cf12b8e80629e57b657ce7\"", - "list_id": "foo.example.com", "member_id": 1055, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1055", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"536e839d0f3b3595b962604a3c758bf2e061e531\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"e13494fb75dda50aeceae50b5830a191d60b0cda\"", + "list_id": "foo.example.com", "member_id": 1204, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1204", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"4d060ce3832700b461400eac6e0ded78d6907cf7\"", "start": 0, "total_size": 1}'} headers: content-length: ['454'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_by_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_by_owner.yaml index ddc50a8..eb633a0 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_by_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_by_owner.yaml @@ -7,10 +7,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f847b4e3a05ab1448c6fd40dfe781f8bd53fcfc7\"", - "list_id": "foo.example.com", "member_id": 1060, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1060", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"5f1c07bcd7ff4e2d964df55b55c78ef68dcf746c\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f5ae4a8b2ee497fff62953052bc37c1838e16b30\"", + "list_id": "foo.example.com", "member_id": 1209, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1209", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"bec79f555a9603109e56934b9a8b84433343b083\"", "start": 0, "total_size": 1}'} headers: content-length: ['454'] @@ -39,8 +39,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f3ae14975cc188a94c91842fc7474da4c2f8b1dd\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/718", "user_id": 718}'} + "\"881a0332a26390eb66a0e023b2cdf849f013c852\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/829", "user_id": 829}'} headers: content-length: ['192'] content-type: [application/json; charset=utf-8] @@ -50,12 +50,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/718/addresses + uri: http://localhost:9001/3.0/users/829/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"f3c90224dfc2b451d7ce91be4f12d72b1d25822b\"", "original_email": "su@example.com", + "\"795a1d9bfeb42216bf17ad29c724635a91ea257a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/718"}], "http_etag": "\"bdc70f878525ca6c9a5cccc82a4e3f9a008dc77a\"", + "user": "http://localhost:9001/3.0/users/829"}], "http_etag": "\"e1a302a3b82e34265138a09f98239db2434bfdca\"", "start": 0, "total_size": 1}'} headers: content-length: ['383'] @@ -68,10 +68,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/su@example.com response: - body: {string: !!python/unicode '{"email": "su@example.com", "http_etag": "\"f3c90224dfc2b451d7ce91be4f12d72b1d25822b\"", + body: {string: !!python/unicode '{"email": "su@example.com", "http_etag": "\"795a1d9bfeb42216bf17ad29c724635a91ea257a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", "user": - "http://localhost:9001/3.0/users/718"}'} + "http://localhost:9001/3.0/users/829"}'} headers: content-length: ['278'] content-type: [application/json; charset=utf-8] @@ -84,10 +84,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f847b4e3a05ab1448c6fd40dfe781f8bd53fcfc7\"", - "list_id": "foo.example.com", "member_id": 1060, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1060", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"5f1c07bcd7ff4e2d964df55b55c78ef68dcf746c\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f5ae4a8b2ee497fff62953052bc37c1838e16b30\"", + "list_id": "foo.example.com", "member_id": 1209, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1209", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"bec79f555a9603109e56934b9a8b84433343b083\"", "start": 0, "total_size": 1}'} headers: content-length: ['454'] @@ -98,16 +98,18 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator + uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} headers: - content-length: ['90'] + content-length: ['294'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=newowner%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=newowner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -117,50 +119,24 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1061'] + location: ['http://localhost:9001/3.0/members/1210'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=1&page=1 - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"f3bd9de00f9a9487a4b1aa5c6e7a9eeba667255d\"", "list_id": "foo.example.com", - "member_id": 1061, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1061", - "user": "http://localhost:9001/3.0/users/719"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f847b4e3a05ab1448c6fd40dfe781f8bd53fcfc7\"", - "list_id": "foo.example.com", "member_id": 1060, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1060", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"2849c1b85b4f91b0d6664665f8d3fc891317164f\"", "start": 0, "total_size": + "\"af74ad64048acc5e9164f6f6383d6caa48b2b9a1\"", "list_id": "foo.example.com", + "member_id": 1210, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1210", + "user": "http://localhost:9001/3.0/users/830"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f5ae4a8b2ee497fff62953052bc37c1838e16b30\"", + "list_id": "foo.example.com", "member_id": 1209, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1209", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"d2a3d78b3af70c2cae17ae55c54956790d8d86b3\"", "start": 0, "total_size": 2}'} headers: content-length: ['817'] @@ -171,30 +147,17 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"f3bd9de00f9a9487a4b1aa5c6e7a9eeba667255d\"", "list_id": "foo.example.com", - "member_id": 1061, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1061", - "user": "http://localhost:9001/3.0/users/719"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f847b4e3a05ab1448c6fd40dfe781f8bd53fcfc7\"", - "list_id": "foo.example.com", "member_id": 1060, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1060", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"2849c1b85b4f91b0d6664665f8d3fc891317164f\"", "start": 0, "total_size": + "\"af74ad64048acc5e9164f6f6383d6caa48b2b9a1\"", "list_id": "foo.example.com", + "member_id": 1210, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1210", + "user": "http://localhost:9001/3.0/users/830"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f5ae4a8b2ee497fff62953052bc37c1838e16b30\"", + "list_id": "foo.example.com", "member_id": 1209, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1209", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"d2a3d78b3af70c2cae17ae55c54956790d8d86b3\"", "start": 0, "total_size": 2}'} headers: content-length: ['817'] @@ -223,8 +186,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f3ae14975cc188a94c91842fc7474da4c2f8b1dd\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/718", "user_id": 718}'} + "\"881a0332a26390eb66a0e023b2cdf849f013c852\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/829", "user_id": 829}'} headers: content-length: ['192'] content-type: [application/json; charset=utf-8] @@ -234,12 +197,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/718/addresses + uri: http://localhost:9001/3.0/users/829/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"f3c90224dfc2b451d7ce91be4f12d72b1d25822b\"", "original_email": "su@example.com", + "\"795a1d9bfeb42216bf17ad29c724635a91ea257a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/718"}], "http_etag": "\"bdc70f878525ca6c9a5cccc82a4e3f9a008dc77a\"", + "user": "http://localhost:9001/3.0/users/829"}], "http_etag": "\"e1a302a3b82e34265138a09f98239db2434bfdca\"", "start": 0, "total_size": 1}'} headers: content-length: ['383'] @@ -252,10 +215,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/su@example.com response: - body: {string: !!python/unicode '{"email": "su@example.com", "http_etag": "\"f3c90224dfc2b451d7ce91be4f12d72b1d25822b\"", + body: {string: !!python/unicode '{"email": "su@example.com", "http_etag": "\"795a1d9bfeb42216bf17ad29c724635a91ea257a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", "user": - "http://localhost:9001/3.0/users/718"}'} + "http://localhost:9001/3.0/users/829"}'} headers: content-length: ['278'] content-type: [application/json; charset=utf-8] @@ -269,13 +232,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"f3bd9de00f9a9487a4b1aa5c6e7a9eeba667255d\"", "list_id": "foo.example.com", - "member_id": 1061, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1061", - "user": "http://localhost:9001/3.0/users/719"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f847b4e3a05ab1448c6fd40dfe781f8bd53fcfc7\"", - "list_id": "foo.example.com", "member_id": 1060, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1060", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"2849c1b85b4f91b0d6664665f8d3fc891317164f\"", "start": 0, "total_size": + "\"af74ad64048acc5e9164f6f6383d6caa48b2b9a1\"", "list_id": "foo.example.com", + "member_id": 1210, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1210", + "user": "http://localhost:9001/3.0/users/830"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f5ae4a8b2ee497fff62953052bc37c1838e16b30\"", + "list_id": "foo.example.com", "member_id": 1209, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1209", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"d2a3d78b3af70c2cae17ae55c54956790d8d86b3\"", "start": 0, "total_size": 2}'} headers: content-length: ['817'] @@ -305,13 +268,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"f3bd9de00f9a9487a4b1aa5c6e7a9eeba667255d\"", "list_id": "foo.example.com", - "member_id": 1061, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1061", - "user": "http://localhost:9001/3.0/users/719"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f847b4e3a05ab1448c6fd40dfe781f8bd53fcfc7\"", - "list_id": "foo.example.com", "member_id": 1060, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1060", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"2849c1b85b4f91b0d6664665f8d3fc891317164f\"", "start": 0, "total_size": + "\"af74ad64048acc5e9164f6f6383d6caa48b2b9a1\"", "list_id": "foo.example.com", + "member_id": 1210, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1210", + "user": "http://localhost:9001/3.0/users/830"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f5ae4a8b2ee497fff62953052bc37c1838e16b30\"", + "list_id": "foo.example.com", "member_id": 1209, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1209", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"d2a3d78b3af70c2cae17ae55c54956790d8d86b3\"", "start": 0, "total_size": 2}'} headers: content-length: ['817'] @@ -336,10 +299,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f847b4e3a05ab1448c6fd40dfe781f8bd53fcfc7\"", - "list_id": "foo.example.com", "member_id": 1060, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1060", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"5f1c07bcd7ff4e2d964df55b55c78ef68dcf746c\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f5ae4a8b2ee497fff62953052bc37c1838e16b30\"", + "list_id": "foo.example.com", "member_id": 1209, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1209", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"bec79f555a9603109e56934b9a8b84433343b083\"", "start": 0, "total_size": 1}'} headers: content-length: ['454'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_self_last.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_self_last.yaml index 5f136cb..eddf7e9 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_self_last.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_owner_self_last.yaml @@ -15,7 +15,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=otherowner%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=otherowner%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -25,7 +25,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1058'] + location: ['http://localhost:9001/3.0/members/1207'] status: {code: 201, message: Created} - request: body: null @@ -36,13 +36,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com", "delivery_mode": "regular", "email": "otherowner@example.com", "http_etag": - "\"b5c3dfcb6f4a914af6e6e85d80f3cb37910c8d04\"", "list_id": "foo.example.com", - "member_id": 1058, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1058", - "user": "http://localhost:9001/3.0/users/720"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f78cce581e587ccfc847945e3aa35f5c9af63c95\"", - "list_id": "foo.example.com", "member_id": 1057, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1057", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"58246a0decd6bcc87e0c4e4874b7e6d17c532cbe\"", "start": 0, "total_size": + "\"5eecbdb15f05cca122b0197dab71ed6921755744\"", "list_id": "foo.example.com", + "member_id": 1207, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1207", + "user": "http://localhost:9001/3.0/users/831"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"a5f1b56bbf550129ff18dd49c81272a9e416da20\"", + "list_id": "foo.example.com", "member_id": 1206, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1206", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"32f459d860249a91442e440797947f931a5a5d19\"", "start": 0, "total_size": 2}'} headers: content-length: ['821'] @@ -57,13 +57,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com", "delivery_mode": "regular", "email": "otherowner@example.com", "http_etag": - "\"b5c3dfcb6f4a914af6e6e85d80f3cb37910c8d04\"", "list_id": "foo.example.com", - "member_id": 1058, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1058", - "user": "http://localhost:9001/3.0/users/720"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f78cce581e587ccfc847945e3aa35f5c9af63c95\"", - "list_id": "foo.example.com", "member_id": 1057, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1057", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"58246a0decd6bcc87e0c4e4874b7e6d17c532cbe\"", "start": 0, "total_size": + "\"5eecbdb15f05cca122b0197dab71ed6921755744\"", "list_id": "foo.example.com", + "member_id": 1207, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1207", + "user": "http://localhost:9001/3.0/users/831"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"a5f1b56bbf550129ff18dd49c81272a9e416da20\"", + "list_id": "foo.example.com", "member_id": 1206, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1206", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"32f459d860249a91442e440797947f931a5a5d19\"", "start": 0, "total_size": 2}'} headers: content-length: ['821'] @@ -93,13 +93,13 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com", "delivery_mode": "regular", "email": "otherowner@example.com", "http_etag": - "\"b5c3dfcb6f4a914af6e6e85d80f3cb37910c8d04\"", "list_id": "foo.example.com", - "member_id": 1058, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1058", - "user": "http://localhost:9001/3.0/users/720"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f78cce581e587ccfc847945e3aa35f5c9af63c95\"", - "list_id": "foo.example.com", "member_id": 1057, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1057", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"58246a0decd6bcc87e0c4e4874b7e6d17c532cbe\"", "start": 0, "total_size": + "\"5eecbdb15f05cca122b0197dab71ed6921755744\"", "list_id": "foo.example.com", + "member_id": 1207, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1207", + "user": "http://localhost:9001/3.0/users/831"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"a5f1b56bbf550129ff18dd49c81272a9e416da20\"", + "list_id": "foo.example.com", "member_id": 1206, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1206", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"32f459d860249a91442e440797947f931a5a5d19\"", "start": 0, "total_size": 2}'} headers: content-length: ['821'] @@ -125,16 +125,16 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com", "delivery_mode": "regular", "email": "otherowner@example.com", "http_etag": - "\"b5c3dfcb6f4a914af6e6e85d80f3cb37910c8d04\"", "list_id": "foo.example.com", - "member_id": 1058, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1058", - "user": "http://localhost:9001/3.0/users/720"}], "http_etag": "\"3030b6bde4809132ffe48174384cca4fbb9090ba\"", + "\"5eecbdb15f05cca122b0197dab71ed6921755744\"", "list_id": "foo.example.com", + "member_id": 1207, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1207", + "user": "http://localhost:9001/3.0/users/831"}], "http_etag": "\"a9def1648cd5778022efe7d68fc6a715121d9d94\"", "start": 0, "total_size": 1}'} headers: content-length: ['470'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=su%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=su%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -144,7 +144,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1059'] + location: ['http://localhost:9001/3.0/members/1208'] status: {code: 201, message: Created} - request: body: null @@ -165,10 +165,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"b8a3518b89b8a2fce07c4abdd6a55674540c8955\"", - "list_id": "foo.example.com", "member_id": 1059, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1059", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"5b391a38aab9a39cb92d41c6d07cdace16742c71\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"2b3de35776c42a87b9f163ed7c17e36065278832\"", + "list_id": "foo.example.com", "member_id": 1208, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1208", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"036bc7f9a9b55e6ee053b0724add9514d74e4483\"", "start": 0, "total_size": 1}'} headers: content-length: ['454'] @@ -182,10 +182,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"b8a3518b89b8a2fce07c4abdd6a55674540c8955\"", - "list_id": "foo.example.com", "member_id": 1059, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1059", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"5b391a38aab9a39cb92d41c6d07cdace16742c71\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"2b3de35776c42a87b9f163ed7c17e36065278832\"", + "list_id": "foo.example.com", "member_id": 1208, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1208", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"036bc7f9a9b55e6ee053b0724add9514d74e4483\"", "start": 0, "total_size": 1}'} headers: content-length: ['454'] @@ -214,10 +214,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"b8a3518b89b8a2fce07c4abdd6a55674540c8955\"", - "list_id": "foo.example.com", "member_id": 1059, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1059", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"5b391a38aab9a39cb92d41c6d07cdace16742c71\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"2b3de35776c42a87b9f163ed7c17e36065278832\"", + "list_id": "foo.example.com", "member_id": 1208, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1208", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"036bc7f9a9b55e6ee053b0724add9514d74e4483\"", "start": 0, "total_size": 1}'} headers: content-length: ['454'] @@ -231,10 +231,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"b8a3518b89b8a2fce07c4abdd6a55674540c8955\"", - "list_id": "foo.example.com", "member_id": 1059, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1059", "user": "http://localhost:9001/3.0/users/718"}], - "http_etag": "\"5b391a38aab9a39cb92d41c6d07cdace16742c71\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"2b3de35776c42a87b9f163ed7c17e36065278832\"", + "list_id": "foo.example.com", "member_id": 1208, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1208", "user": "http://localhost:9001/3.0/users/829"}], + "http_etag": "\"036bc7f9a9b55e6ee053b0724add9514d74e4483\"", "start": 0, "total_size": 1}'} headers: content-length: ['454'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml index 42bafac..f637675 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml @@ -104,7 +104,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Open_list&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BOpen_list%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=open + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Open_list&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BOpen_list%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=open&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -177,7 +177,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Moderate_subs&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BModerate_subs%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=moderate + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Moderate_subs&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BModerate_subs%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=moderate&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -189,7 +189,7 @@ content-length: ['0'] status: {code: 204, message: No Content} - request: - body: password=&display_name=&email=test%40example.com + body: display_name=&password=&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -199,7 +199,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/712'] + location: ['http://localhost:9001/3.0/users/823'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -207,7 +207,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/712/addresses + uri: http://localhost:9001/3.0/users/823/addresses response: body: {string: !!python/unicode ''} headers: @@ -246,9 +246,9 @@ uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/requests response: body: {string: !!python/unicode '{"entries": [{"display_name": "", "email": "fritz@example.org", - "http_etag": "\"3d1c95859c703bf3eabe0ee8bd8f0f26c798774e\"", "list_id": "moderate_subs.example.com", - "token": "7946b2dea66cf4c977638062e61fede9f846a570", "token_owner": "moderator", - "when": "2005-08-01T07:49:23"}], "http_etag": "\"8946d86966536d5b3353df3addf76381053e2a03\"", + "http_etag": "\"f5709f2b367e757f47ebc2368167ef2fdbb6ca59\"", "list_id": "moderate_subs.example.com", + "token": "703ee1a00c3f8bf1f703f4235a851e3051c2c90b", "token_owner": "moderator", + "when": "2005-08-01T07:49:23"}], "http_etag": "\"3b6475ea7a9c460c1239d7f3f9a8c7c9dd649095\"", "start": 0, "total_size": 1}'} headers: content-length: ['368'] @@ -260,7 +260,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/lists/moderate_subs.example.com/requests/7946b2dea66cf4c977638062e61fede9f846a570 + uri: http://localhost:9001/3.0/lists/moderate_subs.example.com/requests/703ee1a00c3f8bf1f703f4235a851e3051c2c90b response: body: {string: !!python/unicode ''} headers: @@ -293,7 +293,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/712 + uri: http://localhost:9001/3.0/users/823 response: body: {string: !!python/unicode ''} headers: @@ -404,7 +404,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Open_list&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BOpen_list%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=open + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Open_list&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BOpen_list%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=open&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -477,7 +477,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Moderate_subs&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BModerate_subs%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=moderate + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Moderate_subs&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BModerate_subs%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=moderate&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -489,7 +489,7 @@ content-length: ['0'] status: {code: 204, message: No Content} - request: - body: password=&display_name=&email=test%40example.com + body: display_name=&password=&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -499,7 +499,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/713'] + location: ['http://localhost:9001/3.0/users/824'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -507,7 +507,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/713/addresses + uri: http://localhost:9001/3.0/users/824/addresses response: body: {string: !!python/unicode ''} headers: @@ -578,7 +578,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/713 + uri: http://localhost:9001/3.0/users/824 response: body: {string: !!python/unicode ''} headers: @@ -689,7 +689,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Open_list&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BOpen_list%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=open + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Open_list&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BOpen_list%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=open&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -762,7 +762,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Moderate_subs&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BModerate_subs%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=moderate + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Moderate_subs&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BModerate_subs%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=moderate&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -774,7 +774,7 @@ content-length: ['0'] status: {code: 204, message: No Content} - request: - body: password=&display_name=&email=test%40example.com + body: display_name=&password=&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -784,7 +784,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/714'] + location: ['http://localhost:9001/3.0/users/825'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -792,7 +792,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/714/addresses + uri: http://localhost:9001/3.0/users/825/addresses response: body: {string: !!python/unicode ''} headers: @@ -831,9 +831,9 @@ uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/requests response: body: {string: !!python/unicode '{"entries": [{"display_name": "", "email": "test@example.com", - "http_etag": "\"56a5943001f7b1382170bdd54bf1c76c34b18b06\"", "list_id": "moderate_subs.example.com", - "token": "f983ffd56bfabec80fb701b991ce867f16612133", "token_owner": "moderator", - "when": "2005-08-01T07:49:23"}], "http_etag": "\"1a78ce4c916cfea39c07335b6c9aaf474132727f\"", + "http_etag": "\"4aa789d66b4f9721377078e051f99b8c12db7907\"", "list_id": "moderate_subs.example.com", + "token": "42f39b8dfac96f4112a45039a80eee3395e7fcb9", "token_owner": "moderator", + "when": "2005-08-01T07:49:23"}], "http_etag": "\"5e38e151250be9f6c28b82ddd0f2e360a45eefd9\"", "start": 0, "total_size": 1}'} headers: content-length: ['367'] @@ -845,7 +845,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/lists/moderate_subs.example.com/requests/f983ffd56bfabec80fb701b991ce867f16612133 + uri: http://localhost:9001/3.0/lists/moderate_subs.example.com/requests/42f39b8dfac96f4112a45039a80eee3395e7fcb9 response: body: {string: !!python/unicode ''} headers: @@ -878,7 +878,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/714 + uri: http://localhost:9001/3.0/users/825 response: body: {string: !!python/unicode ''} headers: @@ -989,7 +989,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Open_list&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BOpen_list%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=open + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Open_list&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BOpen_list%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=open&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -1062,7 +1062,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Moderate_subs&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BModerate_subs%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=moderate + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Moderate_subs&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BModerate_subs%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=moderate&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -1074,7 +1074,7 @@ content-length: ['0'] status: {code: 204, message: No Content} - request: - body: password=&display_name=&email=test%40example.com + body: display_name=&password=&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -1084,7 +1084,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/715'] + location: ['http://localhost:9001/3.0/users/826'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -1092,7 +1092,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/715/addresses + uri: http://localhost:9001/3.0/users/826/addresses response: body: {string: !!python/unicode ''} headers: @@ -1163,7 +1163,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/715 + uri: http://localhost:9001/3.0/users/826 response: body: {string: !!python/unicode ''} headers: @@ -1274,7 +1274,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Open_list&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BOpen_list%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=open + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Open_list&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BOpen_list%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=open&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -1347,7 +1347,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: anonymous_list=False&allow_list_posts=True&advertised=True&description=&digest_size_threshold=30.0&autorespond_postings=none&send_welcome_message=True&autoresponse_postings_text=&autorespond_owner=none&include_rfc2369_headers=True&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&collapse_alternatives=True&filter_content=False&first_strip_reply_to=False&reply_to_address=&display_name=Moderate_subs&posting_pipeline=default-posting-pipeline&reply_goes_to_list=no_munging&admin_notify_mchanges=False&autoresponse_grace_period=90d&autorespond_requests=none&autoresponse_request_text=&admin_immed_notify=True&subject_prefix=%5BModerate_subs%5D+&administrivia=True&convert_html_to_plaintext=False&archive_policy=public&default_nonmember_action=hold&default_member_action=defer&autoresponse_owner_text=&subscription_policy=moderate + body: welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&display_name=Moderate_subs&include_rfc2369_headers=True&collapse_alternatives=True&anonymous_list=False&default_member_action=defer&reply_goes_to_list=no_munging&autorespond_requests=none&posting_pipeline=default-posting-pipeline&advertised=True&autorespond_owner=none&admin_notify_mchanges=False&archive_policy=public&default_nonmember_action=hold&autoresponse_postings_text=&autoresponse_request_text=&filter_content=False&subject_prefix=%5BModerate_subs%5D+&digest_size_threshold=30.0&autorespond_postings=none&autoresponse_owner_text=&reply_to_address=&autoresponse_grace_period=90d&administrivia=True&subscription_policy=moderate&allow_list_posts=True&description=&send_welcome_message=True&admin_immed_notify=True&convert_html_to_plaintext=False&first_strip_reply_to=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -1359,7 +1359,7 @@ content-length: ['0'] status: {code: 204, message: No Content} - request: - body: password=&display_name=&email=test%40example.com + body: display_name=&password=&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -1369,7 +1369,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/716'] + location: ['http://localhost:9001/3.0/users/827'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -1377,7 +1377,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/716/addresses + uri: http://localhost:9001/3.0/users/827/addresses response: body: {string: !!python/unicode ''} headers: @@ -1448,7 +1448,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/716 + uri: http://localhost:9001/3.0/users/827 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_mod_primary.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_mod_primary.yaml index c4df661..5dce360 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_mod_primary.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_mod_primary.yaml @@ -23,9 +23,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"d507ae9ce5b7873093642e22eeac06b5b76d3c5e\"", "is_server_owner": false, - "password": "$6$rounds=673225$NVN44Usxp8mJ3l2A$Bs4Y2HEqumXKaa/BVIVz3orV2XF56rCUcG7/eJAD6jG63C2WOLmWyVcT3/iGucFig8irNU501UJKNmZrPQfY4/", - "self_link": "http://localhost:9001/3.0/users/714", "user_id": 714}'} + "\"1c31aa92ead36ea022e0b2091ace2f439c3fd521\"", "is_server_owner": false, + "password": "$6$rounds=676286$kZQsZGbsLWkkpKHG$YFqGt2gCN7ocyIWwtcgn5vwpgpbq9PjDyjjya6IIBVn9TfLMZ7ooG.OXs89c3QTENRzrgSRVCeXwPr4EzVIh9/", + "self_link": "http://localhost:9001/3.0/users/825", "user_id": 825}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -35,16 +35,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/714/addresses + uri: http://localhost:9001/3.0/users/825/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"30a5d7c841b03ca88e2aa60948d58f356577ebc2\"", "original_email": "fritz@example.org", + "\"4a8a4c6ce6bd49401b8358bfacff031f52e7d43d\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/714", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"c81de9c33e234637c7fff444af11b2a4821f8798\"", + "user": "http://localhost:9001/3.0/users/825", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"6770a83a2cacef06128174621d661ae10911a604\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/714"}], "http_etag": "\"9e6390fd1b2b701c3ac19931f88c94d18112621c\"", + "http://localhost:9001/3.0/users/825"}], "http_etag": "\"2c91081d2a909ad9d091b98da9e9755d25142e79\"", "start": 0, "total_size": 2}'} headers: content-length: ['716'] @@ -57,10 +57,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"30a5d7c841b03ca88e2aa60948d58f356577ebc2\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"4a8a4c6ce6bd49401b8358bfacff031f52e7d43d\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/714", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/825", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -72,10 +72,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"c81de9c33e234637c7fff444af11b2a4821f8798\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"6770a83a2cacef06128174621d661ae10911a604\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/714"}'} + "http://localhost:9001/3.0/users/825"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -107,15 +107,15 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=test%40example.com&pre_confirmed=True&pre_verified=True&display_name=None&list_id=moderate_subs.example.com + body: display_name=None&pre_confirmed=True&list_id=moderate_subs.example.com&subscriber=test%40example.com&pre_verified=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST uri: http://localhost:9001/3.0/members response: - body: {string: !!python/unicode '{"http_etag": "\"bb41c8a8c02395cfa61d0166f062e8fecaf774bb\"", - "token": "f983ffd56bfabec80fb701b991ce867f16612133", "token_owner": "moderator"}'} + body: {string: !!python/unicode '{"http_etag": "\"3a236a0de0c24b62bf53ac65d2c5890c5b55da74\"", + "token": "42f39b8dfac96f4112a45039a80eee3395e7fcb9", "token_owner": "moderator"}'} headers: content-length: ['142'] content-type: [application/json; charset=utf-8] @@ -141,9 +141,9 @@ uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/requests response: body: {string: !!python/unicode '{"entries": [{"display_name": "", "email": "test@example.com", - "http_etag": "\"56a5943001f7b1382170bdd54bf1c76c34b18b06\"", "list_id": "moderate_subs.example.com", - "token": "f983ffd56bfabec80fb701b991ce867f16612133", "token_owner": "moderator", - "when": "2005-08-01T07:49:23"}], "http_etag": "\"1a78ce4c916cfea39c07335b6c9aaf474132727f\"", + "http_etag": "\"4aa789d66b4f9721377078e051f99b8c12db7907\"", "list_id": "moderate_subs.example.com", + "token": "42f39b8dfac96f4112a45039a80eee3395e7fcb9", "token_owner": "moderator", + "when": "2005-08-01T07:49:23"}], "http_etag": "\"5e38e151250be9f6c28b82ddd0f2e360a45eefd9\"", "start": 0, "total_size": 1}'} headers: content-length: ['367'] @@ -173,9 +173,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"d507ae9ce5b7873093642e22eeac06b5b76d3c5e\"", "is_server_owner": false, - "password": "$6$rounds=673225$NVN44Usxp8mJ3l2A$Bs4Y2HEqumXKaa/BVIVz3orV2XF56rCUcG7/eJAD6jG63C2WOLmWyVcT3/iGucFig8irNU501UJKNmZrPQfY4/", - "self_link": "http://localhost:9001/3.0/users/714", "user_id": 714}'} + "\"1c31aa92ead36ea022e0b2091ace2f439c3fd521\"", "is_server_owner": false, + "password": "$6$rounds=676286$kZQsZGbsLWkkpKHG$YFqGt2gCN7ocyIWwtcgn5vwpgpbq9PjDyjjya6IIBVn9TfLMZ7ooG.OXs89c3QTENRzrgSRVCeXwPr4EzVIh9/", + "self_link": "http://localhost:9001/3.0/users/825", "user_id": 825}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -185,17 +185,17 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/714/addresses + uri: http://localhost:9001/3.0/users/825/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"30a5d7c841b03ca88e2aa60948d58f356577ebc2\"", "original_email": "fritz@example.org", + "\"4a8a4c6ce6bd49401b8358bfacff031f52e7d43d\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/714", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"1d8a58f8ad05fbce5979d09fd8925d9724ac3717\"", + "user": "http://localhost:9001/3.0/users/825", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"0342efc47bcfb0d03b4d64a5527132d4033dbdd3\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/714", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"95971ba929ea5d7f6e20ded2fe6b55bb0b6e1dcd\"", "start": 0, "total_size": + "http://localhost:9001/3.0/users/825", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"aff6c51382637456da449de28d87fdd07cdf9a17\"", "start": 0, "total_size": 2}'} headers: content-length: ['754'] @@ -208,10 +208,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"30a5d7c841b03ca88e2aa60948d58f356577ebc2\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"4a8a4c6ce6bd49401b8358bfacff031f52e7d43d\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/714", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/825", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -223,10 +223,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"1d8a58f8ad05fbce5979d09fd8925d9724ac3717\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"0342efc47bcfb0d03b4d64a5527132d4033dbdd3\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/714", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/825", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['322'] content-type: [application/json; charset=utf-8] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_mod_secondary.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_mod_secondary.yaml index 82b2d8f..8c36cae 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_mod_secondary.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_mod_secondary.yaml @@ -23,9 +23,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"ac9803591a721530b5c95a251e7ac560f19a6cbd\"", "is_server_owner": false, - "password": "$6$rounds=601235$lazMStdgQZaeeza6$h1KfsMCxlf54jA49MWgnWxbw.peT/QEsPP6hc1YaR/7LWv4ga/MwanvcYNPcFAdvCTjiSwSjIi2ba6/4m1O4s/", - "self_link": "http://localhost:9001/3.0/users/712", "user_id": 712}'} + "\"e8c2250ec7f2a6db347e1eee369b7695d04053ef\"", "is_server_owner": false, + "password": "$6$rounds=632545$OeAwuqFGCJmZKpIU$hug2B0.XNNew.10CI62Zf0rmAxV4y65x6WaBSI0orOPJPk754bvQTTyA6FV4yAondqyXv/MpKJ29r2aWGaYTm0", + "self_link": "http://localhost:9001/3.0/users/823", "user_id": 823}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -35,16 +35,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/712/addresses + uri: http://localhost:9001/3.0/users/823/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"d1c726bfc23dc68bf43774e65d8e18b4b4384e5f\"", "original_email": "fritz@example.org", + "\"be1fea94917e79f09e7a99620139a6681a4fd18e\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/712", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"ee2997629ec667173910a09b6f3e66f6663c8118\"", + "user": "http://localhost:9001/3.0/users/823", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"f9be9f2a14f952d7e3eede34e5b42f40ae5f48b2\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/712"}], "http_etag": "\"dcd507883ae28151ddbcdf7514b355c7500bf29c\"", + "http://localhost:9001/3.0/users/823"}], "http_etag": "\"5ef815c43213e5727fa06a4d441065da2d44cdc0\"", "start": 0, "total_size": 2}'} headers: content-length: ['716'] @@ -57,10 +57,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"d1c726bfc23dc68bf43774e65d8e18b4b4384e5f\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"be1fea94917e79f09e7a99620139a6681a4fd18e\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/712", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/823", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -72,10 +72,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"ee2997629ec667173910a09b6f3e66f6663c8118\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"f9be9f2a14f952d7e3eede34e5b42f40ae5f48b2\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/712"}'} + "http://localhost:9001/3.0/users/823"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -107,15 +107,15 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=fritz%40example.org&pre_confirmed=True&pre_verified=True&display_name=None&list_id=moderate_subs.example.com + body: display_name=None&pre_confirmed=True&list_id=moderate_subs.example.com&subscriber=fritz%40example.org&pre_verified=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST uri: http://localhost:9001/3.0/members response: - body: {string: !!python/unicode '{"http_etag": "\"f47f7d7e2f262d1eb2a779554aab3f3b2bcd0317\"", - "token": "7946b2dea66cf4c977638062e61fede9f846a570", "token_owner": "moderator"}'} + body: {string: !!python/unicode '{"http_etag": "\"e1e1bd30c950b96103f0a707c4720c4ff5f2a41b\"", + "token": "703ee1a00c3f8bf1f703f4235a851e3051c2c90b", "token_owner": "moderator"}'} headers: content-length: ['142'] content-type: [application/json; charset=utf-8] @@ -141,9 +141,9 @@ uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/requests response: body: {string: !!python/unicode '{"entries": [{"display_name": "", "email": "fritz@example.org", - "http_etag": "\"3d1c95859c703bf3eabe0ee8bd8f0f26c798774e\"", "list_id": "moderate_subs.example.com", - "token": "7946b2dea66cf4c977638062e61fede9f846a570", "token_owner": "moderator", - "when": "2005-08-01T07:49:23"}], "http_etag": "\"8946d86966536d5b3353df3addf76381053e2a03\"", + "http_etag": "\"f5709f2b367e757f47ebc2368167ef2fdbb6ca59\"", "list_id": "moderate_subs.example.com", + "token": "703ee1a00c3f8bf1f703f4235a851e3051c2c90b", "token_owner": "moderator", + "when": "2005-08-01T07:49:23"}], "http_etag": "\"3b6475ea7a9c460c1239d7f3f9a8c7c9dd649095\"", "start": 0, "total_size": 1}'} headers: content-length: ['368'] @@ -173,9 +173,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"ac9803591a721530b5c95a251e7ac560f19a6cbd\"", "is_server_owner": false, - "password": "$6$rounds=601235$lazMStdgQZaeeza6$h1KfsMCxlf54jA49MWgnWxbw.peT/QEsPP6hc1YaR/7LWv4ga/MwanvcYNPcFAdvCTjiSwSjIi2ba6/4m1O4s/", - "self_link": "http://localhost:9001/3.0/users/712", "user_id": 712}'} + "\"e8c2250ec7f2a6db347e1eee369b7695d04053ef\"", "is_server_owner": false, + "password": "$6$rounds=632545$OeAwuqFGCJmZKpIU$hug2B0.XNNew.10CI62Zf0rmAxV4y65x6WaBSI0orOPJPk754bvQTTyA6FV4yAondqyXv/MpKJ29r2aWGaYTm0", + "self_link": "http://localhost:9001/3.0/users/823", "user_id": 823}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -185,16 +185,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/712/addresses + uri: http://localhost:9001/3.0/users/823/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"d1c726bfc23dc68bf43774e65d8e18b4b4384e5f\"", "original_email": "fritz@example.org", + "\"be1fea94917e79f09e7a99620139a6681a4fd18e\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/712", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"ee2997629ec667173910a09b6f3e66f6663c8118\"", + "user": "http://localhost:9001/3.0/users/823", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"f9be9f2a14f952d7e3eede34e5b42f40ae5f48b2\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/712"}], "http_etag": "\"dcd507883ae28151ddbcdf7514b355c7500bf29c\"", + "http://localhost:9001/3.0/users/823"}], "http_etag": "\"5ef815c43213e5727fa06a4d441065da2d44cdc0\"", "start": 0, "total_size": 2}'} headers: content-length: ['716'] @@ -207,10 +207,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"d1c726bfc23dc68bf43774e65d8e18b4b4384e5f\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"be1fea94917e79f09e7a99620139a6681a4fd18e\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/712", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/823", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -222,10 +222,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"ee2997629ec667173910a09b6f3e66f6663c8118\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"f9be9f2a14f952d7e3eede34e5b42f40ae5f48b2\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/712"}'} + "http://localhost:9001/3.0/users/823"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_open_primary.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_open_primary.yaml index 3c93416..4157348 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_open_primary.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_open_primary.yaml @@ -23,9 +23,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"d27e6962dae39444880e7d6c2da1bc374087a6c9\"", "is_server_owner": false, - "password": "$6$rounds=703030$3ZeWTk3urzEtoCvC$Zmlz7JWQuQCdcgVflzdqNbqattF.pqVKTTaFDyOTPaAoYNO6m5yT9kyqQQIYgCClwJanpQCTYSVMQHNp7CCBu/", - "self_link": "http://localhost:9001/3.0/users/715", "user_id": 715}'} + "\"d68b214ef603c1ab85f57598165904e21875194e\"", "is_server_owner": false, + "password": "$6$rounds=660337$7TnOUPgXzwq/MiaS$ZFMtgs3l83xaykAZ6ju9ldlGT7R6Z5KClhV8ZlFAikZOC92KQaAY6dTSJYfpv.iVucv1qIaf9ZQnlq97NpKde.", + "self_link": "http://localhost:9001/3.0/users/826", "user_id": 826}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -35,16 +35,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/715/addresses + uri: http://localhost:9001/3.0/users/826/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"ca8ad6211c254d2b12b27e6afbf7c5e68985a256\"", "original_email": "fritz@example.org", + "\"d18c608b7c453a87c476905c2729176e741ce1f2\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/715", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"c1c8be6c984bce8b549195d54efcff56469956ca\"", + "user": "http://localhost:9001/3.0/users/826", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"6603b687d15df7aeda09a7e14084b926246f88b4\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/715"}], "http_etag": "\"43a451785e892245b1d27f211e6779fcf3dd9e24\"", + "http://localhost:9001/3.0/users/826"}], "http_etag": "\"560790155758fbe3d6e3ed5ec0ec5b06df8d60cb\"", "start": 0, "total_size": 2}'} headers: content-length: ['716'] @@ -57,10 +57,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"ca8ad6211c254d2b12b27e6afbf7c5e68985a256\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"d18c608b7c453a87c476905c2729176e741ce1f2\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/715", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/826", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -72,10 +72,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"c1c8be6c984bce8b549195d54efcff56469956ca\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"6603b687d15df7aeda09a7e14084b926246f88b4\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/715"}'} + "http://localhost:9001/3.0/users/826"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -107,7 +107,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=test%40example.com&pre_confirmed=True&pre_verified=True&display_name=None&list_id=open_list.example.com + body: display_name=None&pre_confirmed=True&list_id=open_list.example.com&subscriber=test%40example.com&pre_verified=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -117,7 +117,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1053'] + location: ['http://localhost:9001/3.0/members/1202'] status: {code: 201, message: Created} - request: body: null @@ -127,10 +127,10 @@ uri: http://localhost:9001/3.0/lists/open_list@example.com/roster/member response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"ce181de8a8ae40f51e4f0213bed04ec3356df4be\"", - "list_id": "open_list.example.com", "member_id": 1053, "role": "member", "self_link": - "http://localhost:9001/3.0/members/1053", "user": "http://localhost:9001/3.0/users/715"}], - "http_etag": "\"35315cd5572b1fe37664e86e123612b13506a47c\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"d893be4718f8d703cd6da03ddfadcb01ac49ea8e\"", + "list_id": "open_list.example.com", "member_id": 1202, "role": "member", "self_link": + "http://localhost:9001/3.0/members/1202", "user": "http://localhost:9001/3.0/users/826"}], + "http_etag": "\"5a46b956e346c1a4169e351791750dd2b6c4ea42\"", "start": 0, "total_size": 1}'} headers: content-length: ['465'] @@ -173,9 +173,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"d27e6962dae39444880e7d6c2da1bc374087a6c9\"", "is_server_owner": false, - "password": "$6$rounds=703030$3ZeWTk3urzEtoCvC$Zmlz7JWQuQCdcgVflzdqNbqattF.pqVKTTaFDyOTPaAoYNO6m5yT9kyqQQIYgCClwJanpQCTYSVMQHNp7CCBu/", - "self_link": "http://localhost:9001/3.0/users/715", "user_id": 715}'} + "\"d68b214ef603c1ab85f57598165904e21875194e\"", "is_server_owner": false, + "password": "$6$rounds=660337$7TnOUPgXzwq/MiaS$ZFMtgs3l83xaykAZ6ju9ldlGT7R6Z5KClhV8ZlFAikZOC92KQaAY6dTSJYfpv.iVucv1qIaf9ZQnlq97NpKde.", + "self_link": "http://localhost:9001/3.0/users/826", "user_id": 826}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -185,17 +185,17 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/715/addresses + uri: http://localhost:9001/3.0/users/826/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"ca8ad6211c254d2b12b27e6afbf7c5e68985a256\"", "original_email": "fritz@example.org", + "\"d18c608b7c453a87c476905c2729176e741ce1f2\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/715", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"d39470b4490b8733e8f18ffc052f1cd5864d2bf8\"", + "user": "http://localhost:9001/3.0/users/826", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"8eb0d3aa0520ebb3f97234bda0df6eada78e30ff\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/715", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"a81b52f8f881896852e9f4a4088c7c7dfc7e02c5\"", "start": 0, "total_size": + "http://localhost:9001/3.0/users/826", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"fc19a39d38786dc8ae305c600b7e9f655e546107\"", "start": 0, "total_size": 2}'} headers: content-length: ['754'] @@ -208,10 +208,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"ca8ad6211c254d2b12b27e6afbf7c5e68985a256\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"d18c608b7c453a87c476905c2729176e741ce1f2\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/715", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/826", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -223,10 +223,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"d39470b4490b8733e8f18ffc052f1cd5864d2bf8\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"8eb0d3aa0520ebb3f97234bda0df6eada78e30ff\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/715", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/826", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['322'] content-type: [application/json; charset=utf-8] @@ -265,9 +265,9 @@ uri: http://localhost:9001/3.0/lists/open_list.example.com/member/test@example.com response: body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"ce181de8a8ae40f51e4f0213bed04ec3356df4be\"", - "list_id": "open_list.example.com", "member_id": 1053, "role": "member", "self_link": - "http://localhost:9001/3.0/members/1053", "user": "http://localhost:9001/3.0/users/715"}'} + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"d893be4718f8d703cd6da03ddfadcb01ac49ea8e\"", + "list_id": "open_list.example.com", "member_id": 1202, "role": "member", "self_link": + "http://localhost:9001/3.0/members/1202", "user": "http://localhost:9001/3.0/users/826"}'} headers: content-length: ['360'] content-type: [application/json; charset=utf-8] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_open_secondary.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_open_secondary.yaml index 885a5a7..8693dc3 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_open_secondary.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_open_secondary.yaml @@ -23,9 +23,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"2a43f39fc89975438b6d7acff6a9ed25d4efbd00\"", "is_server_owner": false, - "password": "$6$rounds=623033$oneFpAmM3KMpPkIU$kkeQNfGBFfeuzgkBuHgbMBJzNBgrvJV6iJTUR3/sQoYixkHeNiBBiVEi/zJKOcQJHJtF2Oi9m2F5twhZWGnkl1", - "self_link": "http://localhost:9001/3.0/users/713", "user_id": 713}'} + "\"c17c8b67fefd1837fe2c480cdae6a4bdb8d77b51\"", "is_server_owner": false, + "password": "$6$rounds=620518$42CsMlcAUi1palQN$BV..0zYz5CaR2U078vg5d7Cd5FNX86CGdEfsM.kCiW14mBwulr.fN5sPTYHLf8uf9eafCY60YUVLOqR54c5LG.", + "self_link": "http://localhost:9001/3.0/users/824", "user_id": 824}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -35,16 +35,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/713/addresses + uri: http://localhost:9001/3.0/users/824/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"7b2b1cca004b071c70ec1773414d0ba356e7f97a\"", "original_email": "fritz@example.org", + "\"ddb21e0a61b18b7e95c428ef5f4009a807951e50\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/713", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"d2ebf1eecc4d6b4b400a6985a321c23e3272aeec\"", + "user": "http://localhost:9001/3.0/users/824", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"37ca7266078be4bb3350a62fb785fe2ad64e0d57\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/713"}], "http_etag": "\"3746763ba5ad0ccc5fa73b9240480f1c1b5e89f9\"", + "http://localhost:9001/3.0/users/824"}], "http_etag": "\"0bc66991190d5c7dcf08a45a173386f68bc4503e\"", "start": 0, "total_size": 2}'} headers: content-length: ['716'] @@ -57,10 +57,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"7b2b1cca004b071c70ec1773414d0ba356e7f97a\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"ddb21e0a61b18b7e95c428ef5f4009a807951e50\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/713", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/824", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -72,10 +72,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"d2ebf1eecc4d6b4b400a6985a321c23e3272aeec\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"37ca7266078be4bb3350a62fb785fe2ad64e0d57\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/713"}'} + "http://localhost:9001/3.0/users/824"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -107,7 +107,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=fritz%40example.org&pre_confirmed=True&pre_verified=True&display_name=None&list_id=open_list.example.com + body: display_name=None&pre_confirmed=True&list_id=open_list.example.com&subscriber=fritz%40example.org&pre_verified=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -117,7 +117,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1052'] + location: ['http://localhost:9001/3.0/members/1201'] status: {code: 201, message: Created} - request: body: null @@ -127,10 +127,10 @@ uri: http://localhost:9001/3.0/lists/open_list@example.com/roster/member response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/fritz@example.org", - "delivery_mode": "regular", "email": "fritz@example.org", "http_etag": "\"c3beee4ae2c52094cc571bca6d9da3da7398eeaf\"", - "list_id": "open_list.example.com", "member_id": 1052, "role": "member", "self_link": - "http://localhost:9001/3.0/members/1052", "user": "http://localhost:9001/3.0/users/713"}], - "http_etag": "\"a964b4dfeadfac1f37af38202d8a11f241ef6180\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "fritz@example.org", "http_etag": "\"e1d97a88773a1d206d9b625a0954ab64c081d5b6\"", + "list_id": "open_list.example.com", "member_id": 1201, "role": "member", "self_link": + "http://localhost:9001/3.0/members/1201", "user": "http://localhost:9001/3.0/users/824"}], + "http_etag": "\"7ae76699ab748a008222abf3b9904651f88fe559\"", "start": 0, "total_size": 1}'} headers: content-length: ['467'] @@ -173,9 +173,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"2a43f39fc89975438b6d7acff6a9ed25d4efbd00\"", "is_server_owner": false, - "password": "$6$rounds=623033$oneFpAmM3KMpPkIU$kkeQNfGBFfeuzgkBuHgbMBJzNBgrvJV6iJTUR3/sQoYixkHeNiBBiVEi/zJKOcQJHJtF2Oi9m2F5twhZWGnkl1", - "self_link": "http://localhost:9001/3.0/users/713", "user_id": 713}'} + "\"c17c8b67fefd1837fe2c480cdae6a4bdb8d77b51\"", "is_server_owner": false, + "password": "$6$rounds=620518$42CsMlcAUi1palQN$BV..0zYz5CaR2U078vg5d7Cd5FNX86CGdEfsM.kCiW14mBwulr.fN5sPTYHLf8uf9eafCY60YUVLOqR54c5LG.", + "self_link": "http://localhost:9001/3.0/users/824", "user_id": 824}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -185,16 +185,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/713/addresses + uri: http://localhost:9001/3.0/users/824/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"7b2b1cca004b071c70ec1773414d0ba356e7f97a\"", "original_email": "fritz@example.org", + "\"ddb21e0a61b18b7e95c428ef5f4009a807951e50\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/713", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"d2ebf1eecc4d6b4b400a6985a321c23e3272aeec\"", + "user": "http://localhost:9001/3.0/users/824", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"37ca7266078be4bb3350a62fb785fe2ad64e0d57\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/713"}], "http_etag": "\"3746763ba5ad0ccc5fa73b9240480f1c1b5e89f9\"", + "http://localhost:9001/3.0/users/824"}], "http_etag": "\"0bc66991190d5c7dcf08a45a173386f68bc4503e\"", "start": 0, "total_size": 2}'} headers: content-length: ['716'] @@ -207,10 +207,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"7b2b1cca004b071c70ec1773414d0ba356e7f97a\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"ddb21e0a61b18b7e95c428ef5f4009a807951e50\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/713", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/824", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -222,10 +222,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"d2ebf1eecc4d6b4b400a6985a321c23e3272aeec\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"37ca7266078be4bb3350a62fb785fe2ad64e0d57\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/713"}'} + "http://localhost:9001/3.0/users/824"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -276,9 +276,9 @@ uri: http://localhost:9001/3.0/lists/open_list.example.com/member/fritz@example.org response: body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/fritz@example.org", - "delivery_mode": "regular", "email": "fritz@example.org", "http_etag": "\"c3beee4ae2c52094cc571bca6d9da3da7398eeaf\"", - "list_id": "open_list.example.com", "member_id": 1052, "role": "member", "self_link": - "http://localhost:9001/3.0/members/1052", "user": "http://localhost:9001/3.0/users/713"}'} + "delivery_mode": "regular", "email": "fritz@example.org", "http_etag": "\"e1d97a88773a1d206d9b625a0954ab64c081d5b6\"", + "list_id": "open_list.example.com", "member_id": 1201, "role": "member", "self_link": + "http://localhost:9001/3.0/members/1201", "user": "http://localhost:9001/3.0/users/824"}'} headers: content-length: ['362'] content-type: [application/json; charset=utf-8] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_unknown.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_unknown.yaml index 9ef9fb9..4640edd 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_unknown.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_unknown.yaml @@ -23,9 +23,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"03091a3a77f5d591c268ab78c748eac6e72b8f3f\"", "is_server_owner": false, - "password": "$6$rounds=613866$6o.DPoYUze/jsw50$IwE6c/74GM0yCMo7gfb/6h8qdsko4JswaUu2L8gv8Lk/84x74zzJ6R4k3l9QREBJiPDolE5He95y8tnTsG6Js.", - "self_link": "http://localhost:9001/3.0/users/716", "user_id": 716}'} + "\"055b92e9282272f5d33a97ef47a82ebd7152ea83\"", "is_server_owner": false, + "password": "$6$rounds=620743$uV4PDcAN6jdXyVQG$PMFO1reGC4/2vOfIDM9rWnU69xhMU0bMQb.la4YUTIjWfRdTmRqfymEXS4K3Kvp.e88jsUV/iALHO9swtKZBg.", + "self_link": "http://localhost:9001/3.0/users/827", "user_id": 827}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -35,16 +35,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/716/addresses + uri: http://localhost:9001/3.0/users/827/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"effa8fc5c6a196f976736c7da67b8d3f44a88fa8\"", "original_email": "fritz@example.org", + "\"a79890e498421e5a9abc76a3d7b8feb1a2818093\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/716", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"d4305bc8cb94b271c3ee89d9684c28140d3bb9a4\"", + "user": "http://localhost:9001/3.0/users/827", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"d681c512b6d685fe030a46899c506cfd4bd21760\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/716"}], "http_etag": "\"f0246027d03aa1d4ec42c65223727ef57b26b70d\"", + "http://localhost:9001/3.0/users/827"}], "http_etag": "\"0752f2708b71c5699ac51c97cbedff2354bbd9e1\"", "start": 0, "total_size": 2}'} headers: content-length: ['716'] @@ -57,10 +57,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"effa8fc5c6a196f976736c7da67b8d3f44a88fa8\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"a79890e498421e5a9abc76a3d7b8feb1a2818093\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/716", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/827", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -72,10 +72,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"d4305bc8cb94b271c3ee89d9684c28140d3bb9a4\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"d681c512b6d685fe030a46899c506cfd4bd21760\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/716"}'} + "http://localhost:9001/3.0/users/827"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -156,9 +156,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"03091a3a77f5d591c268ab78c748eac6e72b8f3f\"", "is_server_owner": false, - "password": "$6$rounds=613866$6o.DPoYUze/jsw50$IwE6c/74GM0yCMo7gfb/6h8qdsko4JswaUu2L8gv8Lk/84x74zzJ6R4k3l9QREBJiPDolE5He95y8tnTsG6Js.", - "self_link": "http://localhost:9001/3.0/users/716", "user_id": 716}'} + "\"055b92e9282272f5d33a97ef47a82ebd7152ea83\"", "is_server_owner": false, + "password": "$6$rounds=620743$uV4PDcAN6jdXyVQG$PMFO1reGC4/2vOfIDM9rWnU69xhMU0bMQb.la4YUTIjWfRdTmRqfymEXS4K3Kvp.e88jsUV/iALHO9swtKZBg.", + "self_link": "http://localhost:9001/3.0/users/827", "user_id": 827}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -168,16 +168,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/716/addresses + uri: http://localhost:9001/3.0/users/827/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"effa8fc5c6a196f976736c7da67b8d3f44a88fa8\"", "original_email": "fritz@example.org", + "\"a79890e498421e5a9abc76a3d7b8feb1a2818093\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/716", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"d4305bc8cb94b271c3ee89d9684c28140d3bb9a4\"", + "user": "http://localhost:9001/3.0/users/827", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"d681c512b6d685fe030a46899c506cfd4bd21760\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/716"}], "http_etag": "\"f0246027d03aa1d4ec42c65223727ef57b26b70d\"", + "http://localhost:9001/3.0/users/827"}], "http_etag": "\"0752f2708b71c5699ac51c97cbedff2354bbd9e1\"", "start": 0, "total_size": 2}'} headers: content-length: ['716'] @@ -190,10 +190,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/fritz@example.org response: - body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"effa8fc5c6a196f976736c7da67b8d3f44a88fa8\"", + body: {string: !!python/unicode '{"email": "fritz@example.org", "http_etag": "\"a79890e498421e5a9abc76a3d7b8feb1a2818093\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": - "http://localhost:9001/3.0/users/716", "verified_on": "2005-08-01T07:49:23"}'} + "http://localhost:9001/3.0/users/827", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['325'] content-type: [application/json; charset=utf-8] @@ -205,10 +205,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"d4305bc8cb94b271c3ee89d9684c28140d3bb9a4\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"d681c512b6d685fe030a46899c506cfd4bd21760\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/716"}'} + "http://localhost:9001/3.0/users/827"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] 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 bde7e37..182f39f 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml @@ -91,12 +91,12 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"3c3c9f0a9733f127ec9ea68e6c64faf1d58b5927\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/724", "user_id": 724}, + "http_etag": "\"3d8e58a242cd989aa4bc47a02dfbfca0b3551ddf\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/835", "user_id": 835}, {"created_on": "2005-08-01T07:49:23", "display_name": "None", "http_etag": - "\"2e7ffc36f680e19d93e21c7c7992d6cb1e6351b6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/725", "user_id": 725}], "http_etag": - "\"7cc3efb637fc6820a512085660ea704863dc2f03\"", "start": 0, "total_size": + "\"cbf776336bf50ffb5be6bb1f12bf5fdd88b3667c\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/836", "user_id": 836}], "http_etag": + "\"7de72c37a4bdc46d42ed3ce6bb4fa98db590a669\"", "start": 0, "total_size": 2}'} headers: content-length: ['515'] @@ -107,7 +107,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/724 + uri: http://localhost:9001/3.0/users/835 response: body: {string: !!python/unicode ''} headers: @@ -118,7 +118,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/725 + uri: http://localhost:9001/3.0/users/836 response: body: {string: !!python/unicode ''} headers: @@ -216,329 +216,10 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"7c8a27b690a19c27eba94737e8fdebcb66f16a32\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/726", "user_id": 726}], - "http_etag": "\"47dc08e34c68477d214481e5907d39b967fa48c6\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['297'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/726 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: mail_host=example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/domains - response: - body: {string: !!python/unicode 'Duplicate email host: example.com'} - headers: - content-length: ['33'] - content-type: [application/json; charset=utf-8] - status: {code: 400, message: Bad Request} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: fqdn_listname=foo%40example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/lists - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/lists/foo.example.com'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists - response: - body: {string: !!python/unicode '{"entries": [{"display_name": "Foo", "fqdn_listname": - "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_id": "foo.example.com", "list_name": "foo", "mail_host": "example.com", - "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['399'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: mail_host=example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/domains - response: - body: {string: !!python/unicode 'Duplicate email host: example.com'} - headers: - content-length: ['33'] - content-type: [application/json; charset=utf-8] - status: {code: 400, message: Bad Request} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: fqdn_listname=foo%40example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/lists - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/lists/foo.example.com'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists - response: - body: {string: !!python/unicode '{"entries": [{"display_name": "Foo", "fqdn_listname": - "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_id": "foo.example.com", "list_name": "foo", "mail_host": "example.com", - "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['399'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users - response: - body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"3debaf04d1aec31525390e1c875210a171b6be34\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/727", "user_id": 727}], - "http_etag": "\"38e0e3da0f4bc18e32908c306311364aef2135a8\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['297'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/727 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: mail_host=example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/domains - response: - body: {string: !!python/unicode 'Duplicate email host: example.com'} - headers: - content-length: ['33'] - content-type: [application/json; charset=utf-8] - status: {code: 400, message: Bad Request} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: fqdn_listname=foo%40example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/lists - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/lists/foo.example.com'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists - response: - body: {string: !!python/unicode '{"entries": [{"display_name": "Foo", "fqdn_listname": - "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_id": "foo.example.com", "list_name": "foo", "mail_host": "example.com", - "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['399'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users - response: - body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"8ee914045b21ef8b55de46b1cdecd1e693126b5f\"", "is_server_owner": - false, "password": "$6$rounds=672459$.5XzeE9JOTlYa5yS$..MZ5ovo6hcQ8q4T3SlptW3LVvmXQoC6K3gDTsgjZ.EVai9jLVRBdhDhXnPvFn0wBNJ4fVPiJMM.PUm2GMKjg.", - "self_link": "http://localhost:9001/3.0/users/728", "user_id": 728}], "http_etag": - "\"782b355831918fec415383b851a8ef37aefc67f7\"", "start": 0, "total_size": + "http_etag": "\"536273f194d2fc3a98889ad4624c6191c70faa21\"", "is_server_owner": + false, "password": "$6$rounds=630135$.ucb9UaxssEiS11Z$tK15XKwFG.Si04RkTTTC3jwa0lZVcgunW7Oplq65X9/We76Fl2TGcjqqJoibmZZelusdZvQUqmUZ4urBsujY30", + "self_link": "http://localhost:9001/3.0/users/837", "user_id": 837}], "http_etag": + "\"5c317cc9c585be6df44e04e49ab519f02f061780\"", "start": 0, "total_size": 1}'} headers: content-length: ['433'] @@ -549,7 +230,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/728 + uri: http://localhost:9001/3.0/users/837 response: body: {string: !!python/unicode ''} headers: @@ -647,10 +328,10 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"b56a8c15a0b1748e4d44c0888c9b0eb422e37bf9\"", "is_server_owner": - false, "password": "$6$rounds=636938$M8zqh7f9xl5gfu9e$vifOszUC5Wj3DpuFjmxcllX097Iixt9eijHZEjdWDOoN9A9lpMpVqK6yVuu6/5zuPpk4IX3xQYyatRcZCS/Np1", - "self_link": "http://localhost:9001/3.0/users/729", "user_id": 729}], "http_etag": - "\"4c5776b21a6f3660aea4669ed225d7f9e05b06dc\"", "start": 0, "total_size": + "http_etag": "\"6885d9eb3b2a24dd6e8c7175b5286c782936f8f0\"", "is_server_owner": + false, "password": "$6$rounds=593428$O06dy86rYp2A1axh$jODat3Pka5AgopQodtHnT6lmhVCIJtdOmOdVmsYhEfOZajXLNYImYchgYr6Mc6REsvUVmg8rcVNZq6P9OyNAN1", + "self_link": "http://localhost:9001/3.0/users/838", "user_id": 838}], "http_etag": + "\"f189ce643266e50f7cb6e33c5dd5380ee7f7ee3e\"", "start": 0, "total_size": 1}'} headers: content-length: ['433'] @@ -661,7 +342,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/729 + uri: http://localhost:9001/3.0/users/838 response: body: {string: !!python/unicode ''} headers: @@ -1095,10 +776,10 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"616225adf1f009f6255e4f0f6a0be5762e6b6642\"", "is_server_owner": - false, "password": "$6$rounds=681732$r1o3130JXF3hnxWi$l.mXElTVt0XklVo7CmqwcGtuhy8bMXk2DVdNUrloRUYNmVXNnGXePBbfD1hc3K73zBC8R3YNzOIRpQfhkAFCP.", - "self_link": "http://localhost:9001/3.0/users/730", "user_id": 730}], "http_etag": - "\"3152064e554acb97c3ba059edb20d4263a6b582f\"", "start": 0, "total_size": + "http_etag": "\"02a9025de27e8f9c4690e29be92ea3594bfb0af6\"", "is_server_owner": + false, "password": "$6$rounds=710368$vDkvjfFUntdcQgMX$bD0tANcpaSDR6VPtyNN2SNZnpQ3RIInYeQjs0/k6xGKjLlQ./27Y74/vREQyfue7kE3JINm8tu593DjQffZDh/", + "self_link": "http://localhost:9001/3.0/users/839", "user_id": 839}], "http_etag": + "\"c1cbe0f11ec000b1fd09aaba9573033c10ae3fb5\"", "start": 0, "total_size": 1}'} headers: content-length: ['433'] @@ -1109,7 +790,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/730 + uri: http://localhost:9001/3.0/users/839 response: body: {string: !!python/unicode ''} headers: @@ -1207,10 +888,10 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"f3f19eb684e6bf3f831ccc0ef50f3c38b307b198\"", "is_server_owner": - false, "password": "$6$rounds=619532$Qu9RRa.GJuLJj5cw$MfkWYNWrsx27.fLxsdTLVzS1Nj/r4WylFiepfHASJ3eosE7O61RHuCoZFy3Ekwu03rYBmjc/Mtc/5Z5kMF5un0", - "self_link": "http://localhost:9001/3.0/users/731", "user_id": 731}], "http_etag": - "\"e1f0c8b32b01a3970ff5946c3e29f531acd60654\"", "start": 0, "total_size": + "http_etag": "\"564185ed6f5812e466d595b04bdfc16df9bd3593\"", "is_server_owner": + false, "password": "$6$rounds=593273$Nu/iAVfIdhCVKJ.K$EBNvsSw5qoPI4RmVgxvzH9KUmbAZZcUG6246t3bGjg3XhZ08CONlPs3fIhSbGH0HxjBwXa/ZBwd0Mf.HFeoFf/", + "self_link": "http://localhost:9001/3.0/users/840", "user_id": 840}], "http_etag": + "\"dd330b22d12a1b3db5b2c539e5fca8c8f9d3c275\"", "start": 0, "total_size": 1}'} headers: content-length: ['433'] @@ -1221,7 +902,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/731 + uri: http://localhost:9001/3.0/users/840 response: body: {string: !!python/unicode ''} headers: @@ -1319,9 +1000,9 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "display_name": "None", "http_etag": "\"41efc9e9766b57122fcfc47a7f238f992794c501\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/732", - "user_id": 732}], "http_etag": "\"8895f84a831b0ef9d3c2b4232cb1e86982c2def2\"", + "display_name": "None", "http_etag": "\"7d5ccba2da3e56c767082bd5d560dc357515bd2c\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/841", + "user_id": 841}], "http_etag": "\"0835b954797340d7adfd10b0d58b51c9c46570af\"", "start": 0, "total_size": 1}'} headers: content-length: ['321'] @@ -1332,107 +1013,10 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/732 + uri: http://localhost:9001/3.0/users/841 response: body: {string: !!python/unicode ''} headers: content-length: ['0'] status: {code: 204, message: No Content} -- request: - body: mail_host=example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/domains - response: - body: {string: !!python/unicode 'Duplicate email host: example.com'} - headers: - content-length: ['33'] - content-type: [application/json; charset=utf-8] - status: {code: 400, message: Bad Request} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode '{"base_url": "http://example.com", "description": - null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "mail_host": - "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", - "url_host": "example.com"}'} - headers: - content-length: ['233'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: fqdn_listname=foo%40example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/lists - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/lists/foo.example.com'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists - response: - body: {string: !!python/unicode '{"entries": [{"display_name": "Foo", "fqdn_listname": - "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", - "list_id": "foo.example.com", "list_name": "foo", "mail_host": "example.com", - "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['399'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_anonymous.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_anonymous.yaml deleted file mode 100644 index 2e723bc..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_anonymous.yaml +++ /dev/null @@ -1,48 +0,0 @@ -interactions: -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_size_threshold": 30.0, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "http_etag": "\"f24060c0fd5762da0d17009ff8b6f303bee3cd2f\"", "include_rfc2369_headers": - true, "join_address": "foo-join@example.com", "last_post_at": null, "leave_address": - "foo-leave@example.com", "list_name": "foo", "mail_host": "example.com", "next_digest_number": - 1, "no_reply_address": "noreply@example.com", "owner_address": "foo-owner@example.com", - "post_id": 1, "posting_address": "foo@example.com", "posting_pipeline": "default-posting-pipeline", - "reply_goes_to_list": "no_munging", "reply_to_address": "", "request_address": - "foo-request@example.com", "scheme": "http", "send_welcome_message": true, - "subject_prefix": "[Foo] ", "subscription_policy": "confirm", "volume": 1, - "web_host": "example.com", "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1610'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_moderator.yaml deleted file mode 100644 index 021ebbe..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_moderator.yaml +++ /dev/null @@ -1,163 +0,0 @@ -interactions: -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: subscriber=test%40example.com&role=moderator&list_id=foo.example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/members - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1075'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/test@example.com - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"3debaf04d1aec31525390e1c875210a171b6be34\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/727", "user_id": 727}'} - headers: - content-length: ['192'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/727/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": - "\"094b2b94eceb47db61cfab8978a9ce2e3063ecfd\"", "original_email": "test@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/727"}], "http_etag": "\"c020b87557a8ab64ae9676605e5642f63ebbc4d1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['389'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/addresses/test@example.com - response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"094b2b94eceb47db61cfab8978a9ce2e3063ecfd\"", - "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", - "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/727"}'} - headers: - content-length: ['284'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"919f130cb98e49f3e8101d86368aca8743ba7ae4\"", - "list_id": "foo.example.com", "member_id": 1075, "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/1075", "user": "http://localhost:9001/3.0/users/727"}], - "http_etag": "\"6d1c79a6d89cf8a2a5d4128016bc1639af12831c\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['462'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/member/test@example.com - response: - body: {string: !!python/unicode '{}'} - headers: - content-length: ['2'] - content-type: [application/json] - status: {code: 404, message: Not Found} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_size_threshold": 30.0, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "http_etag": "\"f24060c0fd5762da0d17009ff8b6f303bee3cd2f\"", "include_rfc2369_headers": - true, "join_address": "foo-join@example.com", "last_post_at": null, "leave_address": - "foo-leave@example.com", "list_name": "foo", "mail_host": "example.com", "next_digest_number": - 1, "no_reply_address": "noreply@example.com", "owner_address": "foo-owner@example.com", - "post_id": 1, "posting_address": "foo@example.com", "posting_pipeline": "default-posting-pipeline", - "reply_goes_to_list": "no_munging", "reply_to_address": "", "request_address": - "foo-request@example.com", "scheme": "http", "send_welcome_message": true, - "subject_prefix": "[Foo] ", "subscription_policy": "confirm", "volume": 1, - "web_host": "example.com", "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1610'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_owner.yaml deleted file mode 100644 index 624f684..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_owner.yaml +++ /dev/null @@ -1,163 +0,0 @@ -interactions: -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: subscriber=test%40example.com&role=owner&list_id=foo.example.com - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode POST - uri: http://localhost:9001/3.0/members - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1074'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/test@example.com - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"7c8a27b690a19c27eba94737e8fdebcb66f16a32\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/726", "user_id": 726}'} - headers: - content-length: ['192'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/726/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": - "\"9d8b313b0036e2adfcd0a2913f35372dfe49788b\"", "original_email": "test@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/726"}], "http_etag": "\"61888c81ebe6a0610fb4910397a446059cb7b58f\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['389'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/addresses/test@example.com - response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"9d8b313b0036e2adfcd0a2913f35372dfe49788b\"", - "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", - "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/726"}'} - headers: - content-length: ['284'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"67d42fa2d999d61bd1118fb10127e348e8e64bff\"", - "list_id": "foo.example.com", "member_id": 1074, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1074", "user": "http://localhost:9001/3.0/users/726"}], - "http_etag": "\"3d770af5a6815c2a064fa13775d47641a037c3cb\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['458'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/member/test@example.com - response: - body: {string: !!python/unicode '{}'} - headers: - content-length: ['2'] - content-type: [application/json] - status: {code: 404, message: Not Found} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_size_threshold": 30.0, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "http_etag": "\"f24060c0fd5762da0d17009ff8b6f303bee3cd2f\"", "include_rfc2369_headers": - true, "join_address": "foo-join@example.com", "last_post_at": null, "leave_address": - "foo-leave@example.com", "list_name": "foo", "mail_host": "example.com", "next_digest_number": - 1, "no_reply_address": "noreply@example.com", "owner_address": "foo-owner@example.com", - "post_id": 1, "posting_address": "foo@example.com", "posting_pipeline": "default-posting-pipeline", - "reply_goes_to_list": "no_munging", "reply_to_address": "", "request_address": - "foo-request@example.com", "scheme": "http", "send_welcome_message": true, - "subject_prefix": "[Foo] ", "subscription_policy": "confirm", "volume": 1, - "web_host": "example.com", "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1610'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_superuser.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_superuser.yaml deleted file mode 100644 index 2749ff3..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_metrics_superuser.yaml +++ /dev/null @@ -1,113 +0,0 @@ -interactions: -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/testadmin@example.com - response: - body: {string: !!python/unicode 404 Not Found} - headers: - content-length: ['13'] - content-type: [application/json; charset=utf-8] - status: {code: 404, message: Not Found} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com/member/testadmin@example.com - response: - body: {string: !!python/unicode '{}'} - headers: - content-length: ['2'] - content-type: [application/json] - status: {code: 404, message: Not Found} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_size_threshold": 30.0, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "http_etag": "\"f24060c0fd5762da0d17009ff8b6f303bee3cd2f\"", "include_rfc2369_headers": - true, "join_address": "foo-join@example.com", "last_post_at": null, "leave_address": - "foo-leave@example.com", "list_name": "foo", "mail_host": "example.com", "next_digest_number": - 1, "no_reply_address": "noreply@example.com", "owner_address": "foo-owner@example.com", - "post_id": 1, "posting_address": "foo@example.com", "posting_pipeline": "default-posting-pipeline", - "reply_goes_to_list": "no_munging", "reply_to_address": "", "request_address": - "foo-request@example.com", "scheme": "http", "send_welcome_message": true, - "subject_prefix": "[Foo] ", "subscription_policy": "confirm", "volume": 1, - "web_host": "example.com", "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1610'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_moderator.yaml index 4581039..288bfda 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_moderator.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: password=None&display_name=&email=test%40example.com + body: display_name=&password=None&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -10,7 +10,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/730'] + location: ['http://localhost:9001/3.0/users/839'] status: {code: 201, message: Created} - request: body: null @@ -28,7 +28,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=test%40example.com&role=moderator&list_id=foo.example.com + body: role=moderator&list_id=foo.example.com&subscriber=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -38,7 +38,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1078'] + location: ['http://localhost:9001/3.0/members/1225'] status: {code: 201, message: Created} - request: body: null @@ -63,9 +63,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"616225adf1f009f6255e4f0f6a0be5762e6b6642\"", "is_server_owner": false, - "password": "$6$rounds=681732$r1o3130JXF3hnxWi$l.mXElTVt0XklVo7CmqwcGtuhy8bMXk2DVdNUrloRUYNmVXNnGXePBbfD1hc3K73zBC8R3YNzOIRpQfhkAFCP.", - "self_link": "http://localhost:9001/3.0/users/730", "user_id": 730}'} + "\"02a9025de27e8f9c4690e29be92ea3594bfb0af6\"", "is_server_owner": false, + "password": "$6$rounds=710368$vDkvjfFUntdcQgMX$bD0tANcpaSDR6VPtyNN2SNZnpQ3RIInYeQjs0/k6xGKjLlQ./27Y74/vREQyfue7kE3JINm8tu593DjQffZDh/", + "self_link": "http://localhost:9001/3.0/users/839", "user_id": 839}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -75,12 +75,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/730/addresses + uri: http://localhost:9001/3.0/users/839/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": - "\"03c5a2c56522c84dd8c084c7a6d64920469cf680\"", "original_email": "test@example.com", + "\"671bfca351de429d9e9048c8cb39d00d7529fa01\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/730"}], "http_etag": "\"ef456b15b9e53f15f0cd2a1102dfadd8fe0e2b65\"", + "user": "http://localhost:9001/3.0/users/839"}], "http_etag": "\"70d0949db9b3b5d7309e76179c31a39b557542cc\"", "start": 0, "total_size": 1}'} headers: content-length: ['389'] @@ -93,10 +93,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"03c5a2c56522c84dd8c084c7a6d64920469cf680\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"671bfca351de429d9e9048c8cb39d00d7529fa01\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/730"}'} + "http://localhost:9001/3.0/users/839"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -122,10 +122,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"1aa3823ad68eee70547a1d9afbce56f450663db7\"", - "list_id": "foo.example.com", "member_id": 1078, "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/1078", "user": "http://localhost:9001/3.0/users/730"}], - "http_etag": "\"8d5674890e2b076c78185329166bd4a1374d3447\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"1402c2d4a16718f681eeb598e7d8a184bf40ed8a\"", + "list_id": "foo.example.com", "member_id": 1225, "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/1225", "user": "http://localhost:9001/3.0/users/839"}], + "http_etag": "\"f3cd232b9ccd325baff39f82cdad88539e4df371\"", "start": 0, "total_size": 1}'} headers: content-length: ['462'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_owner.yaml index 3b3bc36..d7eb5c1 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_owner.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: password=None&display_name=&email=test%40example.com + body: display_name=&password=None&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -10,7 +10,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/731'] + location: ['http://localhost:9001/3.0/users/840'] status: {code: 201, message: Created} - request: body: null @@ -28,7 +28,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=test%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -38,7 +38,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1079'] + location: ['http://localhost:9001/3.0/members/1226'] status: {code: 201, message: Created} - request: body: null @@ -63,9 +63,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f3f19eb684e6bf3f831ccc0ef50f3c38b307b198\"", "is_server_owner": false, - "password": "$6$rounds=619532$Qu9RRa.GJuLJj5cw$MfkWYNWrsx27.fLxsdTLVzS1Nj/r4WylFiepfHASJ3eosE7O61RHuCoZFy3Ekwu03rYBmjc/Mtc/5Z5kMF5un0", - "self_link": "http://localhost:9001/3.0/users/731", "user_id": 731}'} + "\"564185ed6f5812e466d595b04bdfc16df9bd3593\"", "is_server_owner": false, + "password": "$6$rounds=593273$Nu/iAVfIdhCVKJ.K$EBNvsSw5qoPI4RmVgxvzH9KUmbAZZcUG6246t3bGjg3XhZ08CONlPs3fIhSbGH0HxjBwXa/ZBwd0Mf.HFeoFf/", + "self_link": "http://localhost:9001/3.0/users/840", "user_id": 840}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -75,12 +75,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/731/addresses + uri: http://localhost:9001/3.0/users/840/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": - "\"66993cf2bb3fb5afdf0833140a65de20c66444e3\"", "original_email": "test@example.com", + "\"09ac21649ea7eee9d70796a512125372a795201d\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/731"}], "http_etag": "\"7202446153c6866c735177eadee03f5186ddb9c1\"", + "user": "http://localhost:9001/3.0/users/840"}], "http_etag": "\"ae1fc9c0b7224870dc784f6f7b3dd29414ea91f3\"", "start": 0, "total_size": 1}'} headers: content-length: ['389'] @@ -93,10 +93,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"66993cf2bb3fb5afdf0833140a65de20c66444e3\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"09ac21649ea7eee9d70796a512125372a795201d\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/731"}'} + "http://localhost:9001/3.0/users/840"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -109,10 +109,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"92770c9a13050ec10ec0e327d55d8a6a3614ed9d\"", - "list_id": "foo.example.com", "member_id": 1079, "role": "owner", "self_link": - "http://localhost:9001/3.0/members/1079", "user": "http://localhost:9001/3.0/users/731"}], - "http_etag": "\"537358392cf67ba600e45c6f554b26367f46e314\"", "start": 0, "total_size": + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"da088b48bb2f3af95a7d88efd69f19e9ba1fd4a4\"", + "list_id": "foo.example.com", "member_id": 1226, "role": "owner", "self_link": + "http://localhost:9001/3.0/members/1226", "user": "http://localhost:9001/3.0/users/840"}], + "http_etag": "\"e3e5d89bbb7c143744eb61c649d3195174af2409\"", "start": 0, "total_size": 1}'} headers: content-length: ['458'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_secondary_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_secondary_moderator.yaml index 0ba7f4d..fafc0e6 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_secondary_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_secondary_moderator.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: password=None&display_name=&email=test%40example.com + body: display_name=&password=None&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -10,7 +10,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/728'] + location: ['http://localhost:9001/3.0/users/837'] status: {code: 201, message: Created} - request: body: email=anotheremail%40example.com @@ -18,7 +18,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/728/addresses + uri: http://localhost:9001/3.0/users/837/addresses response: body: {string: !!python/unicode ''} headers: @@ -52,7 +52,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=anotheremail%40example.com&role=moderator&list_id=foo.example.com + body: role=moderator&list_id=foo.example.com&subscriber=anotheremail%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -62,7 +62,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1076'] + location: ['http://localhost:9001/3.0/members/1223'] status: {code: 201, message: Created} - request: body: null @@ -87,9 +87,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"8ee914045b21ef8b55de46b1cdecd1e693126b5f\"", "is_server_owner": false, - "password": "$6$rounds=672459$.5XzeE9JOTlYa5yS$..MZ5ovo6hcQ8q4T3SlptW3LVvmXQoC6K3gDTsgjZ.EVai9jLVRBdhDhXnPvFn0wBNJ4fVPiJMM.PUm2GMKjg.", - "self_link": "http://localhost:9001/3.0/users/728", "user_id": 728}'} + "\"536273f194d2fc3a98889ad4624c6191c70faa21\"", "is_server_owner": false, + "password": "$6$rounds=630135$.ucb9UaxssEiS11Z$tK15XKwFG.Si04RkTTTC3jwa0lZVcgunW7Oplq65X9/We76Fl2TGcjqqJoibmZZelusdZvQUqmUZ4urBsujY30", + "self_link": "http://localhost:9001/3.0/users/837", "user_id": 837}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -99,16 +99,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/728/addresses + uri: http://localhost:9001/3.0/users/837/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "anotheremail@example.com", - "http_etag": "\"8f2efac8726dacb09c3905e74ca61579e571ba64\"", "original_email": + "http_etag": "\"c3b8967e1b6fbdb89a6990822144416daa175840\"", "original_email": "anotheremail@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/728", + "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/837", "verified_on": "2005-08-01T07:49:23"}, {"email": "test@example.com", "http_etag": - "\"9dd4d9d336f357698f2e77d9cb844b4325614efd\"", "original_email": "test@example.com", + "\"fbd7fa9dbfe5abadaa38ba9677a9c31e540ba341\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/728"}], "http_etag": "\"9c1fde44ce1dac6dfc3a0833422801e7fe61c2e3\"", + "user": "http://localhost:9001/3.0/users/837"}], "http_etag": "\"7b95a99a728de6ebcf4df0c8e559ecf4e6594a89\"", "start": 0, "total_size": 2}'} headers: content-length: ['737'] @@ -122,9 +122,9 @@ uri: http://localhost:9001/3.0/addresses/anotheremail@example.com response: body: {string: !!python/unicode '{"email": "anotheremail@example.com", "http_etag": - "\"8f2efac8726dacb09c3905e74ca61579e571ba64\"", "original_email": "anotheremail@example.com", + "\"c3b8967e1b6fbdb89a6990822144416daa175840\"", "original_email": "anotheremail@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/anotheremail@example.com", - "user": "http://localhost:9001/3.0/users/728", "verified_on": "2005-08-01T07:49:23"}'} + "user": "http://localhost:9001/3.0/users/837", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['346'] content-type: [application/json; charset=utf-8] @@ -136,10 +136,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"9dd4d9d336f357698f2e77d9cb844b4325614efd\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"fbd7fa9dbfe5abadaa38ba9677a9c31e540ba341\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/728"}'} + "http://localhost:9001/3.0/users/837"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -166,9 +166,9 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/anotheremail@example.com", "delivery_mode": "regular", "email": "anotheremail@example.com", "http_etag": - "\"7fdddc81f40030bcbc855c5377b78459158ad6b8\"", "list_id": "foo.example.com", - "member_id": 1076, "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1076", - "user": "http://localhost:9001/3.0/users/728"}], "http_etag": "\"b9d303db741677b13488dd8fc606dbf622dd30f8\"", + "\"0be485a8ddd170df38c8d3bdccf297e2f8039e17\"", "list_id": "foo.example.com", + "member_id": 1223, "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1223", + "user": "http://localhost:9001/3.0/users/837"}], "http_etag": "\"944cf0467cd30b2a7f63187c330128d6a5fc9650\"", "start": 0, "total_size": 1}'} headers: content-length: ['478'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_secondary_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_secondary_owner.yaml index d934713..aee7f2e 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_secondary_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary_secondary_owner.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: password=None&display_name=&email=test%40example.com + body: display_name=&password=None&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -10,7 +10,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/729'] + location: ['http://localhost:9001/3.0/users/838'] status: {code: 201, message: Created} - request: body: email=anotheremail%40example.com @@ -18,7 +18,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/729/addresses + uri: http://localhost:9001/3.0/users/838/addresses response: body: {string: !!python/unicode ''} headers: @@ -52,7 +52,7 @@ content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: - body: subscriber=anotheremail%40example.com&role=owner&list_id=foo.example.com + body: role=owner&list_id=foo.example.com&subscriber=anotheremail%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -62,7 +62,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1077'] + location: ['http://localhost:9001/3.0/members/1224'] status: {code: 201, message: Created} - request: body: null @@ -87,9 +87,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b56a8c15a0b1748e4d44c0888c9b0eb422e37bf9\"", "is_server_owner": false, - "password": "$6$rounds=636938$M8zqh7f9xl5gfu9e$vifOszUC5Wj3DpuFjmxcllX097Iixt9eijHZEjdWDOoN9A9lpMpVqK6yVuu6/5zuPpk4IX3xQYyatRcZCS/Np1", - "self_link": "http://localhost:9001/3.0/users/729", "user_id": 729}'} + "\"6885d9eb3b2a24dd6e8c7175b5286c782936f8f0\"", "is_server_owner": false, + "password": "$6$rounds=593428$O06dy86rYp2A1axh$jODat3Pka5AgopQodtHnT6lmhVCIJtdOmOdVmsYhEfOZajXLNYImYchgYr6Mc6REsvUVmg8rcVNZq6P9OyNAN1", + "self_link": "http://localhost:9001/3.0/users/838", "user_id": 838}'} headers: content-length: ['328'] content-type: [application/json; charset=utf-8] @@ -99,16 +99,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/729/addresses + uri: http://localhost:9001/3.0/users/838/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "anotheremail@example.com", - "http_etag": "\"c753b48ebe378f7c00041af27eb96069e6f416bf\"", "original_email": + "http_etag": "\"855ff4908b8cb01df44206abf28bd6de628b702c\"", "original_email": "anotheremail@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/729", + "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/838", "verified_on": "2005-08-01T07:49:23"}, {"email": "test@example.com", "http_etag": - "\"c89307cf5842c50ec41550ae5b0ae852673b3e79\"", "original_email": "test@example.com", + "\"cf99fc5fff760e8c47de6c2f7e6019cd80d67c2c\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/729"}], "http_etag": "\"c539bea6c5bfda3b796903419f0d417916026173\"", + "user": "http://localhost:9001/3.0/users/838"}], "http_etag": "\"31c050e032e8f1747dd3cc7c338b77d7051f2a5b\"", "start": 0, "total_size": 2}'} headers: content-length: ['737'] @@ -122,9 +122,9 @@ uri: http://localhost:9001/3.0/addresses/anotheremail@example.com response: body: {string: !!python/unicode '{"email": "anotheremail@example.com", "http_etag": - "\"c753b48ebe378f7c00041af27eb96069e6f416bf\"", "original_email": "anotheremail@example.com", + "\"855ff4908b8cb01df44206abf28bd6de628b702c\"", "original_email": "anotheremail@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/anotheremail@example.com", - "user": "http://localhost:9001/3.0/users/729", "verified_on": "2005-08-01T07:49:23"}'} + "user": "http://localhost:9001/3.0/users/838", "verified_on": "2005-08-01T07:49:23"}'} headers: content-length: ['346'] content-type: [application/json; charset=utf-8] @@ -136,10 +136,10 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/addresses/test@example.com response: - body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"c89307cf5842c50ec41550ae5b0ae852673b3e79\"", + body: {string: !!python/unicode '{"email": "test@example.com", "http_etag": "\"cf99fc5fff760e8c47de6c2f7e6019cd80d67c2c\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/729"}'} + "http://localhost:9001/3.0/users/838"}'} headers: content-length: ['284'] content-type: [application/json; charset=utf-8] @@ -153,9 +153,9 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/anotheremail@example.com", "delivery_mode": "regular", "email": "anotheremail@example.com", "http_etag": - "\"28b1a158be5f5be301971e3ddb1736b6a862e000\"", "list_id": "foo.example.com", - "member_id": 1077, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1077", - "user": "http://localhost:9001/3.0/users/729"}], "http_etag": "\"a89ea6787c1831197eb9b969691a585a8f3bf6cb\"", + "\"d13464856637e26c2de3520b3fc9ac533cc7c6be\"", "list_id": "foo.example.com", + "member_id": 1224, "role": "owner", "self_link": "http://localhost:9001/3.0/members/1224", + "user": "http://localhost:9001/3.0/users/838"}], "http_etag": "\"a102da5d29f6d3d6db79eb98c2f83946ed6e66f7\"", "start": 0, "total_size": 1}'} headers: content-length: ['474'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_model.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_model.yaml index 1f8249e..be236c7 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_model.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_model.yaml @@ -56,7 +56,7 @@ location: ['http://localhost:9001/3.0/lists/foo.example.com'] status: {code: 201, message: Created} - request: - body: password=None&display_name=None&email=test%40example.com + body: display_name=&password=&email=test%40example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] @@ -66,7 +66,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/723'] + location: ['http://localhost:9001/3.0/users/834'] status: {code: 201, message: Created} - request: body: null @@ -75,12 +75,12 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/test@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "display_name": - "None", "http_etag": "\"10bce4e08f42e79f4f4697710109a892495ec457\"", "is_server_owner": - false, "password": "$6$rounds=617066$BNEPM0lB8jcr1k4a$iMYvG5Opb0vi5qExN4BeC7f3SCt1kclbp5RoL2bGc1HNvElObSga4auz6j.AFCotRsvqsSLznFDYVGihVYb640", - "self_link": "http://localhost:9001/3.0/users/723", "user_id": 723}'} + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"017e47c4afcadfde56923b0db19edfdaf0c74869\"", "is_server_owner": false, + "password": "$6$rounds=601898$bHJpXP/gNLvnNNyw$W7QJ2hi5OkI9Ln3WCZKPVIfQQLItmG9r4yZjyryuPKnb46gHIflK1Mnpa5Irb0JFXVT2ZMz4S72WgnC5WNO040", + "self_link": "http://localhost:9001/3.0/users/834", "user_id": 834}'} headers: - content-length: ['352'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -88,16 +88,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/723/addresses + uri: http://localhost:9001/3.0/users/834/addresses response: - body: {string: !!python/unicode '{"entries": [{"display_name": "None", "email": - "test@example.com", "http_etag": "\"65d52404f595b812eba1db559314b643e8aa39c7\"", - "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", - "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/723"}], "http_etag": "\"413f827548a808d7e3d9e18a31ae502a79ec6533\"", + body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": + "\"8c7e149ee49143d2df95110b03dbc74489daa16a\"", "original_email": "test@example.com", + "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", + "user": "http://localhost:9001/3.0/users/834"}], "http_etag": "\"9631ed22f2a24940402d562ed864b79efc715f00\"", "start": 0, "total_size": 1}'} headers: - content-length: ['413'] + content-length: ['389'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -136,26 +135,25 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"1bd866f2360ae18d1b4eb5694c41049dfc6123c1\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/717", "user_id": 717}, - {"created_on": "2005-08-01T07:49:23", "http_etag": "\"f3ae14975cc188a94c91842fc7474da4c2f8b1dd\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/718", - "user_id": 718}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"5abeb37f37cb2e34a199877ebd478c8ff0e5c4d3\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/719", - "user_id": 719}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"97cdadef28b0f30a2a0df71695104ae4f08e0981\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/720", - "user_id": 720}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"f206325454526c0a6fdc5973a6347af757e9210e\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/721", - "user_id": 721}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"f0f06a596368f3735b71d2d3a267630745581782\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/722", - "user_id": 722}, {"created_on": "2005-08-01T07:49:23", "display_name": "None", - "http_etag": "\"10bce4e08f42e79f4f4697710109a892495ec457\"", "is_server_owner": - false, "password": "$6$rounds=617066$BNEPM0lB8jcr1k4a$iMYvG5Opb0vi5qExN4BeC7f3SCt1kclbp5RoL2bGc1HNvElObSga4auz6j.AFCotRsvqsSLznFDYVGihVYb640", - "self_link": "http://localhost:9001/3.0/users/723", "user_id": 723}], "http_etag": - "\"c29865cf522a5342f98666e227baf1dcdbc09699\"", "start": 0, "total_size": + "http_etag": "\"bd4f84bc442d4fe5f00398903bb688ea8f85b8c3\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/828", "user_id": 828}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"881a0332a26390eb66a0e023b2cdf849f013c852\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/829", + "user_id": 829}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"4e685091235aaf5bdd140babe1c0c897d4363bd2\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/830", + "user_id": 830}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"5224cda73e10d5490780a3c3783b327f1ce9aaad\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/831", + "user_id": 831}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"cfceb1eb2d3a2543bb402dc62f8471da5e8878ee\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/832", + "user_id": 832}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"2af1f94331910955062fa2e246301bf2231f768e\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/833", + "user_id": 833}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"017e47c4afcadfde56923b0db19edfdaf0c74869\"", + "is_server_owner": false, "password": "$6$rounds=601898$bHJpXP/gNLvnNNyw$W7QJ2hi5OkI9Ln3WCZKPVIfQQLItmG9r4yZjyryuPKnb46gHIflK1Mnpa5Irb0JFXVT2ZMz4S72WgnC5WNO040", + "self_link": "http://localhost:9001/3.0/users/834", "user_id": 834}], "http_etag": + "\"6e34ad3f8a1301537bd37a837911c1b7df3e54cd\"", "start": 0, "total_size": 7}'} headers: - content-length: ['1621'] + content-length: ['1597'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -163,7 +161,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/717 + uri: http://localhost:9001/3.0/users/828 response: body: {string: !!python/unicode ''} headers: @@ -174,7 +172,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/718 + uri: http://localhost:9001/3.0/users/829 response: body: {string: !!python/unicode ''} headers: @@ -185,7 +183,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/719 + uri: http://localhost:9001/3.0/users/830 response: body: {string: !!python/unicode ''} headers: @@ -196,7 +194,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/720 + uri: http://localhost:9001/3.0/users/831 response: body: {string: !!python/unicode ''} headers: @@ -207,7 +205,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/721 + uri: http://localhost:9001/3.0/users/832 response: body: {string: !!python/unicode ''} headers: @@ -218,7 +216,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/722 + uri: http://localhost:9001/3.0/users/833 response: body: {string: !!python/unicode ''} headers: @@ -229,7 +227,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/723 + uri: http://localhost:9001/3.0/users/834 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/mailman_api_tests/test_list_members.py b/src/postorius/tests/mailman_api_tests/test_list_members.py index 5e23e4f..bb1351d 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_members.py +++ b/src/postorius/tests/mailman_api_tests/test_list_members.py @@ -75,7 +75,7 @@ @MM_VCR.use_cassette('list_members_access.yaml') def test_page_not_accessible_if_not_logged_in(self): - url = reverse('list_members', args=('foo@example.com', )) + url = reverse('list_members', args=('foo@example.com', 'subscribers',)) response = self.client.get(url) if "%40" not in url: # Django < 1.8 url = quote(url) @@ -88,28 +88,28 @@ def test_page_not_accessible_for_unprivileged_users(self): self.client.login(username='testuser', password='testpass') response = self.client.get(reverse('list_members', - args=('foo@example.com', ))) + args=('foo@example.com', 'subscribers',))) self.assertEqual(response.status_code, 403) @MM_VCR.use_cassette('list_members_page.yaml') def test_not_accessible_for_moderator(self): self.client.login(username='testmoderator', password='testpass') response = self.client.get(reverse('list_members', - args=('foo@example.com', ))) + args=('foo@example.com', 'subscribers',))) self.assertEqual(response.status_code, 403) @MM_VCR.use_cassette('list_members_page.yaml') def test_page_accessible_for_superuser(self): self.client.login(username='testsu', password='testpass') response = self.client.get(reverse('list_members', - args=('foo@example.com', ))) + args=('foo@example.com', 'subscribers',))) self.assertEqual(response.status_code, 200) @MM_VCR.use_cassette('list_members_page.yaml') def test_page_accessible_for_owner(self): self.client.login(username='testowner', password='testpass') response = self.client.get(reverse('list_members', - args=('foo@example.com', ))) + args=('foo@example.com', 'subscribers',))) self.assertEqual(response.status_code, 200) @@ -141,8 +141,8 @@ @MM_VCR.use_cassette('test_list_members_owner_add_remove.yaml') def test_add_remove_owner(self): self.client.post( - reverse('list_members', args=('foo@example.com', )), - {'owner_email': 'newowner@example.com'}) + reverse('list_members', args=('foo@example.com', 'owners',)), + {'email': 'newowner@example.com'}) self.assertTrue('newowner@example.com' in self.foo_list.owners) self.client.post( reverse('remove_role', args=('foo@example.com', 'owner', @@ -157,8 +157,8 @@ self.su.save() # It must still be allowed to create and remove owners self.client.post( - reverse('list_members', args=('foo@example.com', )), - {'owner_email': 'newowner@example.com'}) + reverse('list_members', args=('foo@example.com', 'owners',)), + {'email': 'newowner@example.com'}) self.assertTrue('newowner@example.com' in self.foo_list.owners) response = self.client.post( reverse('remove_role', args=('foo@example.com', 'owner', @@ -219,8 +219,8 @@ # login and post new moderator data to url self.client.login(username='su', password='pwd') self.client.post( - reverse('list_members', args=('foo@example.com', )), - {'moderator_email': 'newmod@example.com'}) + reverse('list_members', args=('foo@example.com', 'moderators',)), + {'email': 'newmod@example.com'}) moderators = self.foo_list.moderators @MM_VCR.use_cassette('test_list_members_add_moderator.yaml') diff --git a/src/postorius/urls.py b/src/postorius/urls.py index 59dd81c..7df73d3 100644 --- a/src/postorius/urls.py +++ b/src/postorius/urls.py @@ -29,12 +29,11 @@ per_list_urlpatterns = patterns('postorius.views', url(r'^csv_view/$', 'csv_view', name='csv_view'), - url(r'^members/$', - ListMembersView.as_view( - ), name='list_members'), url(r'^members/options/(?P[^/]+)/$', ListMemberOptionsView.as_view( ), name='list_member_options'), + url(r'^members/(?P\w+)/$', + 'list_members_view', name='list_members'), url(r'^$', ListSummaryView.as_view( ), name='list_summary'), diff --git a/src/postorius/views/list.py b/src/postorius/views/list.py index 4081c12..f7d7e30 100644 --- a/src/postorius/views/list.py +++ b/src/postorius/views/list.py @@ -44,72 +44,66 @@ logger = logging.getLogger(__name__) -class ListMembersView(MailingListView): - - """Display all members of a given list. - """ - - @property - def _common_context(self): - return { - 'list': self.mailing_list, - 'count_options': [25, 50, 100, 200], - } - - @method_decorator(list_owner_required) - def post(self, request, list_id): - # FIXME: form usage is wrong here, they should be instantiated only - # once or the form errors will be erased. - if 'owner_email' in request.POST: - owner_form = NewOwnerForm(request.POST) - if owner_form.is_valid(): +"""Display all members of a given list. +""" +@login_required +@list_owner_required +def list_members_view(request, list_id, role=None): + if role not in ['owners', 'moderators', 'subscribers']: + return redirect('list_members', list_id, 'subscribers') + mailing_list = List.objects.get_or_404(fqdn_listname=list_id) + if request.method == 'POST': + if role == 'subscribers': + form = MultipleChoiceForm(request.POST) + if form.is_valid(): + members = form.cleaned_data['choices'] + for member in members: + mailing_list.unsubscribe(member) + messages.success(request, _('The selected members have been unsubscribed')) + else: + member_form = MemberForm(request.POST) + if member_form.is_valid(): try: - self.mailing_list.add_owner( - owner_form.cleaned_data['owner_email']) - messages.success( - request, _('%s has been added as list owner.' - % request.POST['owner_email'])) + if role == 'moderators': + mailing_list.add_moderator(member_form.cleaned_data['email']) + messages.success( + request, _('%s has been added as list moderator.' + % member_form.cleaned_data['email'])) + elif role == 'owners': + mailing_list.add_owner(member_form.cleaned_data['email']) + messages.success( + request, _('%s has been added as list owner.' + % member_form.cleaned_data['email'])) except HTTPError as e: messages.error(request, _(e.msg)) - if 'moderator_email' in request.POST: - moderator_form = NewModeratorForm(request.POST) - if moderator_form.is_valid(): - try: - self.mailing_list.add_moderator( - moderator_form.cleaned_data['moderator_email']) - messages.success( - request, _('%s has been added as list moderator.' - % request.POST['moderator_email'])) - except HTTPError as e: - messages.error(request, _(e.msg)) - owner_form = NewOwnerForm() - moderator_form = NewModeratorForm() - members = utils.paginate( - request, self.mailing_list.get_member_page, + else: + form = MultipleChoiceForm() + member_form = MemberForm() + context = { + 'list': mailing_list, + } + if role == 'subscribers': + context['members'] = utils.paginate( + request, mailing_list.get_member_page, count=request.GET.get('count', 25), paginator_class=utils.MailmanPaginator) - context = { - 'owner_form': owner_form, - 'moderator_form': moderator_form, - 'members': members, - } - context.update(self._common_context) - return render(request, 'postorius/lists/members.html', context) - - @method_decorator(login_required) - @method_decorator(list_owner_required) - def get(self, request, list_id, page=1): - members = utils.paginate( - request, self.mailing_list.get_member_page, - count=request.GET.get('count', 25), - paginator_class=utils.MailmanPaginator) - context = { - 'owner_form': NewOwnerForm(), - 'moderator_form': NewModeratorForm(), - 'members': members, - } - context.update(self._common_context) - return render(request, 'postorius/lists/members.html', context) + context['page_title'] = _('List Subscribers') + context['empty_error'] = _('List has no Subscribers') + context['count_options'] = [25, 50, 100, 200] + else: + context['member_form'] = member_form + if role == 'owners': + context['members'] = mailing_list.owners + context['page_title'] = _('List Owners') + context['form_action'] = _('Add Owner') + context['role'] = 'owner' + elif role == 'moderators': + context['members'] = mailing_list.moderators + context['page_title'] = _('List Moderators') + context['empty_error'] = _('List has no Moderators') + context['form_action'] = _('Add Moderator') + context['role'] = 'moderator' + return render(request, 'postorius/lists/members.html', context) class ListMemberOptionsView(MailingListView): @@ -120,7 +114,7 @@ try: client = utils.get_client() mm_member = client.get_member(list_id, email) - mm_list = client.get_list(list_id) + mm_list = List.objects.get_or_404(fqdn_listname=list_id) preferences_form = UserPreferences(request.POST) if preferences_form.is_valid(): preferences = mm_member.preferences @@ -152,7 +146,7 @@ try: client = utils.get_client() mm_member = client.get_member(list_id, email) - mm_list = client.get_list(list_id) + mm_list = List.objects.get_or_404(fqdn_listname=list_id) settingsform = UserPreferences(initial=mm_member.preferences) except MailmanApiError: return utils.render_api_error(request) @@ -378,14 +372,14 @@ count=request.GET.get('count', 20)) context = { 'held_messages': held_messages, - 'form': HeldMessagesModerationForm(), + 'form': MultipleChoiceForm(), } context.update(self._common_context) return render(request, 'postorius/lists/held_messages.html', context) @method_decorator(list_moderator_required) def post(self, request, *args, **kwargs): - form = HeldMessagesModerationForm(request.POST) + form = MultipleChoiceForm(request.POST) if form.is_valid(): message_ids = form.cleaned_data['choices'] try: @@ -416,8 +410,7 @@ """ mm_lists = [] try: - client = utils.get_client() - mm_lists = client.get_list(list_id) + mm_lists = List.objects.get_or_404(fqdn_listname=list_id) except MailmanApiError: return utils.render_api_error(request) @@ -617,7 +610,7 @@ """Shows a list of held messages. """ try: - m_list = utils.get_client().get_list(list_id) + m_list = List.objects.get_or_404(fqdn_listname=list_id) except MailmanApiError: return utils.render_api_error(request) return render_to_response('postorius/lists/subscription_requests.html', @@ -642,7 +635,7 @@ 'defer': _('The request has been defered.'), } try: - m_list = utils.get_client().get_list(list_id) + m_list = List.objects.get_or_404(fqdn_listname=list_id) # Moderate request and add feedback message to session. m_list.moderate_request(request_id, action) messages.success(request, confirmation_messages[action]) @@ -732,16 +725,16 @@ except MailmanApiError: return utils.render_api_error(request) - redirect_on_success = redirect('list_members', the_list.list_id) + redirect_on_success = redirect('list_members', the_list.list_id, '{}s'.format(role)) if role == 'owner': owners = the_list.owners if address not in owners: messages.error(request, _('The user %s is not an owner') % address) - return redirect('list_members', the_list.list_id) + return redirect('list_members', the_list.list_id, 'owners') if len(owners) == 1: messages.error(request, _('Removing the last owner is impossible')) - return redirect('list_members', the_list.list_id) + return redirect('list_members', the_list.list_id, 'owners') # the user may not have a other_emails property if it's a superuser user_addresses = set([request.user.email]) | \ set(getattr(request.user, 'other_emails', [])) @@ -752,7 +745,7 @@ elif role == 'moderator': if address not in the_list.moderators: messages.error(request, _('The user %s is not a moderator') % address) - return redirect('list_members', the_list.list_id) + return redirect('list_members', the_list.list_id, 'moderators') if request.method == 'POST': try: the_list.remove_role(role, address) @@ -761,7 +754,7 @@ except HTTPError as e: messages.error(request, _('The %(role)s could not be removed: %(msg)s') % {'role':role, 'msg': e.msg}) - return redirect('list_members', the_list.list_id) + return redirect('list_members', the_list.list_id, '{}s'.format(role)) messages.success(request, _('The user %(address)s has been removed as %(role)s.') % {'address': address, 'role': role}) return redirect_on_success @@ -838,7 +831,7 @@ Activate or deactivate list archivers. """ # Get the list and cache the archivers property. - m_list = utils.get_client().get_list(list_id) + m_list = List.objects.get_or_404(fqdn_listname=list_id) archivers = m_list.archivers # Process form submission.