diff --git a/src/postorius/forms.py b/src/postorius/forms.py index 2a78b31..140f122 100644 --- a/src/postorius/forms.py +++ b/src/postorius/forms.py @@ -164,17 +164,23 @@ class ListSubscribe(FieldsetForm): - """Form fields to join an existing list. """ - email = forms.EmailField( - label=_('Your email address'), - widget=forms.HiddenInput(), - error_messages={'required': _('Please enter an email address.'), - 'invalid': _('Please enter a valid email address.')}) + + email = forms.ChoiceField(label=_('Your email address'), + validators=[validate_email], + widget=forms.Select(), + error_messages={'required': _('Please enter an email address.'), + 'invalid': _('Please enter a valid email address.')}) + display_name = forms.CharField(label=_('Your name (optional)'), required=False) + def __init__(self, user_emails, *args, **kwargs): + super(ListSubscribe, self).__init__(*args, **kwargs) + self.fields['email'].choices = ((address, address) + for address in user_emails) + class ListUnsubscribe(FieldsetForm): @@ -826,3 +832,14 @@ raise forms.ValidationError(_('Please provide a different email ' 'address than your own.')) return cleaned_data + +class ChangeSubscriptionForm(forms.Form): + email = forms.ChoiceField() + + def __init__(self, user_emails, *args, **kwargs): + super(ChangeSubscriptionForm, self).__init__(*args, **kwargs) + self.fields['email'] = forms.ChoiceField( + label=_('Select Email'), + required=False, + widget=forms.Select(), + choices=((address, address) for address in user_emails)) diff --git a/src/postorius/models.py b/src/postorius/models.py index 295cd24..cb79995 100644 --- a/src/postorius/models.py +++ b/src/postorius/models.py @@ -27,8 +27,10 @@ from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ImproperlyConfigured -from django.core.urlresolvers import reverse from django.core.mail import send_mail +from django.db.models.signals import post_save +from django.core.urlresolvers import reverse +from django.dispatch import receiver from django.db import models from django.http import Http404 from django.template import Context @@ -41,6 +43,22 @@ logger = logging.getLogger(__name__) +@receiver(post_save, sender=User) +def create_mailman_user(sender, **kwargs): + if kwargs.get('created'): + autocreate = False + try: + autocreate = settings.AUTOCREATE_MAILMAN_USER + except AttributeError: + pass + if autocreate: + user = kwargs.get('instance') + client = get_client() + try: + client.create_user(user.email, None, None) + except HTTPError: + pass + class MailmanApiError(Exception): """Raised if the API is not available. """ diff --git a/src/postorius/templates/postorius/lists/summary.html b/src/postorius/templates/postorius/lists/summary.html index 253bc44..f478c60 100644 --- a/src/postorius/templates/postorius/lists/summary.html +++ b/src/postorius/templates/postorius/lists/summary.html @@ -40,7 +40,23 @@ {% if userSubscribed %} - {% trans "Unsubscribe" %} + +

+ {% trans "You are subscribed to this list with the following address" %}: {{ subscribed_address }} +

+ +
+ +
+ {% csrf_token %} + {{change_subscription_form.as_p}} + +
+ +
+ + {% trans "Unsubscribe" %} {{ subscribed_address }} + {% else %} diff --git a/src/postorius/templates/postorius/user_mailmansettings.html b/src/postorius/templates/postorius/user_mailmansettings.html index 23b63a0..10382cc 100644 --- a/src/postorius/templates/postorius/user_mailmansettings.html +++ b/src/postorius/templates/postorius/user_mailmansettings.html @@ -33,7 +33,7 @@

{% trans "Mail Delivery" %}:

[{% trans 'More info' %}{{ settingsform.delivery_status.help_text }} - ]

+ ]

{{settingsform.delivery_status }} diff --git a/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml b/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml index 5c9844d..e426934 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/archival_options.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,14 +43,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -67,7 +65,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] location: ['http://localhost:9001/3.0/lists/test_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -80,14 +78,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": - "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "test_list", "display_name": "Test_list", "list_id": "test_list.example.com", + "member_count": 0, "fqdn_listname": "test_list@example.com", "http_etag": + "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,12 +97,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": false, "http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\"", - "prototype": false, "mail-archive": true}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": false, "mail-archive": + true, "http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\""}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -116,14 +114,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": - "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "test_list", "display_name": "Test_list", "list_id": "test_list.example.com", + "member_count": 0, "fqdn_listname": "test_list@example.com", "http_etag": + "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -138,7 +136,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml index 61f7da6..7e39c7d 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,14 +43,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -67,7 +65,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -80,18 +78,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com + body: role=owner&subscriber=owner%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -103,12 +101,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] - location: ['http://localhost:9001/3.0/members/329671489027490421265386582601272028519'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] + location: ['http://localhost:9001/3.0/members/58694139851881328554076579791556559643'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com + body: role=moderator&subscriber=moderator%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -120,8 +118,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] - location: ['http://localhost:9001/3.0/members/196553294715842416766462573342664802582'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] + location: ['http://localhost:9001/3.0/members/301920928048316817504986838317705093446'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -136,7 +134,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -153,7 +151,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -165,14 +163,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -184,14 +181,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -207,7 +203,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -220,18 +216,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com + body: role=owner&subscriber=owner%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -243,12 +239,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] - location: ['http://localhost:9001/3.0/members/273159179840151621454458997067388833786'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] + location: ['http://localhost:9001/3.0/members/104597404185462268851527227999257447264'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com + body: role=moderator&subscriber=moderator%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -260,8 +256,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] - location: ['http://localhost:9001/3.0/members/331227949447350025956816628996255206393'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] + location: ['http://localhost:9001/3.0/members/125897732057180252325707119635194125341'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -276,7 +272,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -293,7 +289,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -305,14 +301,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -324,14 +319,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -347,7 +341,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -360,18 +354,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com + body: role=owner&subscriber=owner%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -383,12 +377,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] - location: ['http://localhost:9001/3.0/members/299024060552066861675391395432566914375'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] + location: ['http://localhost:9001/3.0/members/12074168645281219821012097651555517878'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com + body: role=moderator&subscriber=moderator%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -400,8 +394,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] - location: ['http://localhost:9001/3.0/members/135784022531765933381966377047581383248'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] + location: ['http://localhost:9001/3.0/members/94650724485659036062661613518054999504'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -416,7 +410,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -433,7 +427,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -445,14 +439,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -464,14 +457,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -487,7 +479,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -500,18 +492,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com + body: role=owner&subscriber=owner%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -523,12 +515,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] - location: ['http://localhost:9001/3.0/members/159126608472498677387861696412130511419'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] + location: ['http://localhost:9001/3.0/members/223241540512653506064200078189238573818'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com + body: role=moderator&subscriber=moderator%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -540,8 +532,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] - location: ['http://localhost:9001/3.0/members/259951785367547693411594524461957027558'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] + location: ['http://localhost:9001/3.0/members/233835866298862862372349670001300225520'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -553,14 +545,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -572,12 +564,11 @@ 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\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -589,17 +580,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"b0f031240d12c8b4ea034d1415307ce30966dbeb\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", - "list_id": "foo.example.com", "http_etag": "\"6a7190aa0efe0ad862adf5f54d0db421a5f10480\"", - "member_id": 159126608472498677387861696412130511419, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", - "self_link": "http://localhost:9001/3.0/members/159126608472498677387861696412130511419"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/owner@example.com", "user": "http://localhost:9001/3.0/users/57534215827853875099162175535757293119", + "http_etag": "\"7b3da3c765b0408c50bea70374f8e4e01913866e\"", "member_id": + 223241540512653506064200078189238573818, "email": "owner@example.com", "self_link": + "http://localhost:9001/3.0/members/223241540512653506064200078189238573818"}], + "http_etag": "\"1e2b531abe36d9a977bd2aedc683aa318a21e166\""}'} headers: content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -611,17 +602,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"e9da2125c80f8192000fc5372434c862ba383aa6\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", - "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "list_id": "foo.example.com", "http_etag": "\"8a881fd76841b8740ba2338d9e9b40147f3673c2\"", - "member_id": 259951785367547693411594524461957027558, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", - "self_link": "http://localhost:9001/3.0/members/259951785367547693411594524461957027558"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "moderator", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/287867428867435321086730016686195529878", + "http_etag": "\"623b5e1d1f1f7719de9a6c21668d944119c08a23\"", "member_id": + 233835866298862862372349670001300225520, "email": "moderator@example.com", + "self_link": "http://localhost:9001/3.0/members/233835866298862862372349670001300225520"}], + "http_etag": "\"cbf8fdadcbd196fcb561fda13eb3b646f2905d1d\""}'} headers: - content-length: ['577'] + content-length: ['578'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -633,14 +624,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -652,17 +643,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"b0f031240d12c8b4ea034d1415307ce30966dbeb\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", - "list_id": "foo.example.com", "http_etag": "\"6a7190aa0efe0ad862adf5f54d0db421a5f10480\"", - "member_id": 159126608472498677387861696412130511419, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", - "self_link": "http://localhost:9001/3.0/members/159126608472498677387861696412130511419"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/owner@example.com", "user": "http://localhost:9001/3.0/users/57534215827853875099162175535757293119", + "http_etag": "\"7b3da3c765b0408c50bea70374f8e4e01913866e\"", "member_id": + 223241540512653506064200078189238573818, "email": "owner@example.com", "self_link": + "http://localhost:9001/3.0/members/223241540512653506064200078189238573818"}], + "http_etag": "\"1e2b531abe36d9a977bd2aedc683aa318a21e166\""}'} headers: content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -677,7 +668,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:36 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -694,7 +685,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -706,14 +697,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -725,14 +715,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:34 GMT'] + date: ['Fri, 17 Apr 2015 21:49:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -748,7 +737,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:35 GMT'] + date: ['Fri, 17 Apr 2015 21:49:37 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -761,18 +750,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:35 GMT'] + date: ['Fri, 17 Apr 2015 21:49:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: role=owner&list_id=foo.example.com&subscriber=owner%40example.com + body: role=owner&subscriber=owner%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -784,12 +773,12 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:35 GMT'] - location: ['http://localhost:9001/3.0/members/312239528095316624976791046185857013969'] + date: ['Fri, 17 Apr 2015 21:49:37 GMT'] + location: ['http://localhost:9001/3.0/members/243905402299323753448717454607070434360'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: - body: role=moderator&list_id=foo.example.com&subscriber=moderator%40example.com + body: role=moderator&subscriber=moderator%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -801,8 +790,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:35 GMT'] - location: ['http://localhost:9001/3.0/members/7648356180096890742121894934671798426'] + date: ['Fri, 17 Apr 2015 21:49:37 GMT'] + location: ['http://localhost:9001/3.0/members/204683289941882419930096616056113784385'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -814,14 +803,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:35 GMT'] + date: ['Fri, 17 Apr 2015 21:49:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -833,12 +822,11 @@ 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\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:35 GMT'] + date: ['Fri, 17 Apr 2015 21:49:37 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -853,7 +841,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:35 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml index 829a8fb..ffbfa29 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml @@ -8,14 +8,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -27,12 +27,11 @@ 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\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,17 +43,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"97f8e274cb18d9e67c7519373aeb3007d0cbfb7e\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", - "list_id": "foo.example.com", "http_etag": "\"f3f5f44200fe8710a7f16f0d4d17f8b065ed8a73\"", - "member_id": 329671489027490421265386582601272028519, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", - "self_link": "http://localhost:9001/3.0/members/329671489027490421265386582601272028519"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/owner@example.com", "user": "http://localhost:9001/3.0/users/57534215827853875099162175535757293119", + "http_etag": "\"6cb59e4c1529107406688065b59dc91dd6984e86\"", "member_id": + 58694139851881328554076579791556559643, "email": "owner@example.com", "self_link": + "http://localhost:9001/3.0/members/58694139851881328554076579791556559643"}], + "http_etag": "\"b5c0583a820a6629e7e035c13b9bab9d7ee49499\""}'} headers: - content-length: ['565'] + content-length: ['563'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -66,17 +65,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"8dc83a6a5bc90e582d6fe2430de9711d4520e469\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", - "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "list_id": "foo.example.com", "http_etag": "\"f05e6ac32f4e64d3b9284df949fe9815287e555b\"", - "member_id": 196553294715842416766462573342664802582, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", - "self_link": "http://localhost:9001/3.0/members/196553294715842416766462573342664802582"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "moderator", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/287867428867435321086730016686195529878", + "http_etag": "\"f488fe4a6045cb560d599910dbfc3260c02b82a7\"", "member_id": + 301920928048316817504986838317705093446, "email": "moderator@example.com", + "self_link": "http://localhost:9001/3.0/members/301920928048316817504986838317705093446"}], + "http_etag": "\"f5290e7c5f531fcaddf4aa6ba75ba04e58b6eb5f\""}'} headers: - content-length: ['577'] + content-length: ['578'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -88,14 +87,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -107,17 +106,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"97f8e274cb18d9e67c7519373aeb3007d0cbfb7e\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", - "list_id": "foo.example.com", "http_etag": "\"f3f5f44200fe8710a7f16f0d4d17f8b065ed8a73\"", - "member_id": 329671489027490421265386582601272028519, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", - "self_link": "http://localhost:9001/3.0/members/329671489027490421265386582601272028519"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/owner@example.com", "user": "http://localhost:9001/3.0/users/57534215827853875099162175535757293119", + "http_etag": "\"6cb59e4c1529107406688065b59dc91dd6984e86\"", "member_id": + 58694139851881328554076579791556559643, "email": "owner@example.com", "self_link": + "http://localhost:9001/3.0/members/58694139851881328554076579791556559643"}], + "http_etag": "\"b5c0583a820a6629e7e035c13b9bab9d7ee49499\""}'} headers: - content-length: ['565'] + content-length: ['563'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -129,14 +128,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -148,12 +147,11 @@ 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\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -165,17 +163,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"c30123ccd446c01058bdb1e04209dbe9d6dea00a\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", - "list_id": "foo.example.com", "http_etag": "\"d16014a89b461fc3edb2511553a8e18c1c50484b\"", - "member_id": 273159179840151621454458997067388833786, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", - "self_link": "http://localhost:9001/3.0/members/273159179840151621454458997067388833786"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/owner@example.com", "user": "http://localhost:9001/3.0/users/57534215827853875099162175535757293119", + "http_etag": "\"314bbfa7ab67e91ddd50163915a6fc7c8c28215b\"", "member_id": + 104597404185462268851527227999257447264, "email": "owner@example.com", "self_link": + "http://localhost:9001/3.0/members/104597404185462268851527227999257447264"}], + "http_etag": "\"8368053e36b23658a00427499f95d729d6c6230e\""}'} headers: content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -187,17 +185,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"7bf369f9e60c0fc2bda5a94f81d76608d83ec31c\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", - "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "list_id": "foo.example.com", "http_etag": "\"317149b2b5f0ea3a65deb5f4ff7f6583c0fe7fa6\"", - "member_id": 331227949447350025956816628996255206393, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", - "self_link": "http://localhost:9001/3.0/members/331227949447350025956816628996255206393"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "moderator", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/287867428867435321086730016686195529878", + "http_etag": "\"bfdf32d876fcd8dfdfcf11c44e5c545cafdf6aab\"", "member_id": + 125897732057180252325707119635194125341, "email": "moderator@example.com", + "self_link": "http://localhost:9001/3.0/members/125897732057180252325707119635194125341"}], + "http_etag": "\"64b056a01cccdacd878f3bb6d5be2093a5bc6221\""}'} headers: - content-length: ['577'] + content-length: ['578'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -209,17 +207,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"c30123ccd446c01058bdb1e04209dbe9d6dea00a\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", - "list_id": "foo.example.com", "http_etag": "\"d16014a89b461fc3edb2511553a8e18c1c50484b\"", - "member_id": 273159179840151621454458997067388833786, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", - "self_link": "http://localhost:9001/3.0/members/273159179840151621454458997067388833786"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/owner@example.com", "user": "http://localhost:9001/3.0/users/57534215827853875099162175535757293119", + "http_etag": "\"314bbfa7ab67e91ddd50163915a6fc7c8c28215b\"", "member_id": + 104597404185462268851527227999257447264, "email": "owner@example.com", "self_link": + "http://localhost:9001/3.0/members/104597404185462268851527227999257447264"}], + "http_etag": "\"8368053e36b23658a00427499f95d729d6c6230e\""}'} headers: content-length: ['565'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -231,17 +229,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"7bf369f9e60c0fc2bda5a94f81d76608d83ec31c\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", - "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "list_id": "foo.example.com", "http_etag": "\"317149b2b5f0ea3a65deb5f4ff7f6583c0fe7fa6\"", - "member_id": 331227949447350025956816628996255206393, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", - "self_link": "http://localhost:9001/3.0/members/331227949447350025956816628996255206393"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "moderator", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/287867428867435321086730016686195529878", + "http_etag": "\"bfdf32d876fcd8dfdfcf11c44e5c545cafdf6aab\"", "member_id": + 125897732057180252325707119635194125341, "email": "moderator@example.com", + "self_link": "http://localhost:9001/3.0/members/125897732057180252325707119635194125341"}], + "http_etag": "\"64b056a01cccdacd878f3bb6d5be2093a5bc6221\""}'} headers: - content-length: ['577'] + content-length: ['578'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:32 GMT'] + date: ['Fri, 17 Apr 2015 21:49:34 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -253,14 +251,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -272,12 +270,11 @@ 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\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -289,17 +286,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"26bd6686cfe7a4f8557f9042362c7466fa627240\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", - "list_id": "foo.example.com", "http_etag": "\"ad9414d29c784cb7960ffd5ec0c4809495e779ff\"", - "member_id": 299024060552066861675391395432566914375, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", - "self_link": "http://localhost:9001/3.0/members/299024060552066861675391395432566914375"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/owner@example.com", "user": "http://localhost:9001/3.0/users/57534215827853875099162175535757293119", + "http_etag": "\"b751bd3ee345db5ecfb9dde8fc9f52022fdb92a7\"", "member_id": + 12074168645281219821012097651555517878, "email": "owner@example.com", "self_link": + "http://localhost:9001/3.0/members/12074168645281219821012097651555517878"}], + "http_etag": "\"92b03db40ca85718626f3ff893e4325731e747a8\""}'} headers: - content-length: ['565'] + content-length: ['563'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -311,17 +308,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"f522516f993a5825937a080d7d5581016a152ab8\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", - "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "list_id": "foo.example.com", "http_etag": "\"ea4b59149fb520cd9c27c85626d11e1e524a8c2b\"", - "member_id": 135784022531765933381966377047581383248, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", - "self_link": "http://localhost:9001/3.0/members/135784022531765933381966377047581383248"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "moderator", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/287867428867435321086730016686195529878", + "http_etag": "\"4bf848b66656a7770c262a16b0b8303a5abd619d\"", "member_id": + 94650724485659036062661613518054999504, "email": "moderator@example.com", + "self_link": "http://localhost:9001/3.0/members/94650724485659036062661613518054999504"}], + "http_etag": "\"1cf74e0e834e424d7f759182f568332fe35519b8\""}'} headers: - content-length: ['577'] + content-length: ['576'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -333,17 +330,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"26bd6686cfe7a4f8557f9042362c7466fa627240\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", - "list_id": "foo.example.com", "http_etag": "\"ad9414d29c784cb7960ffd5ec0c4809495e779ff\"", - "member_id": 299024060552066861675391395432566914375, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", - "self_link": "http://localhost:9001/3.0/members/299024060552066861675391395432566914375"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/owner@example.com", "user": "http://localhost:9001/3.0/users/57534215827853875099162175535757293119", + "http_etag": "\"b751bd3ee345db5ecfb9dde8fc9f52022fdb92a7\"", "member_id": + 12074168645281219821012097651555517878, "email": "owner@example.com", "self_link": + "http://localhost:9001/3.0/members/12074168645281219821012097651555517878"}], + "http_etag": "\"92b03db40ca85718626f3ff893e4325731e747a8\""}'} headers: - content-length: ['565'] + content-length: ['563'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -355,17 +352,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"f522516f993a5825937a080d7d5581016a152ab8\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", - "email": "moderator@example.com", "address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "list_id": "foo.example.com", "http_etag": "\"ea4b59149fb520cd9c27c85626d11e1e524a8c2b\"", - "member_id": 135784022531765933381966377047581383248, "user": "http://localhost:9001/3.0/users/92094995257680408839787381726301419694", - "self_link": "http://localhost:9001/3.0/members/135784022531765933381966377047581383248"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "moderator", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/287867428867435321086730016686195529878", + "http_etag": "\"4bf848b66656a7770c262a16b0b8303a5abd619d\"", "member_id": + 94650724485659036062661613518054999504, "email": "moderator@example.com", + "self_link": "http://localhost:9001/3.0/members/94650724485659036062661613518054999504"}], + "http_etag": "\"1cf74e0e834e424d7f759182f568332fe35519b8\""}'} headers: - content-length: ['577'] + content-length: ['576'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:33 GMT'] + date: ['Fri, 17 Apr 2015 21:49:35 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml new file mode 100644 index 0000000..e46b643 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml @@ -0,0 +1,289 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: display_name=None&list_id=foo.example.com&subscriber=test%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode '{"token": "ca9d7b69aa6be3cca2d4f781903e5527e900a780", + "http_etag": "\"13ed3905bc3a398fa29f6401b9cf3b4166bf5e32\"", "token_owner": + "subscriber"}'} + headers: + content-length: ['143'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '{"is_server_owner": false, "created_on": "2015-04-17T21:49:42.543677", + "http_etag": "\"9c7db56868280a314f88ebe3617eb470bbc1e12a\"", "user_id": 145884944174755256087575342095483601919, + "display_name": "None", "self_link": "http://localhost:9001/3.0/users/145884944174755256087575342095483601919"}'} + headers: + content-length: ['295'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: email=anotheremail%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/users/145884944174755256087575342095483601919/addresses + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + location: ['http://localhost:9001/3.0/addresses/anotheremail@example.com'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '{"is_server_owner": false, "created_on": "2015-04-17T21:49:42.543677", + "http_etag": "\"9c7db56868280a314f88ebe3617eb470bbc1e12a\"", "user_id": 145884944174755256087575342095483601919, + "display_name": "None", "self_link": "http://localhost:9001/3.0/users/145884944174755256087575342095483601919"}'} + headers: + content-length: ['295'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/145884944174755256087575342095483601919 + response: + body: {string: !!python/unicode '{"is_server_owner": false, "created_on": "2015-04-17T21:49:42.543677", + "http_etag": "\"9c7db56868280a314f88ebe3617eb470bbc1e12a\"", "user_id": 145884944174755256087575342095483601919, + "display_name": "None", "self_link": "http://localhost:9001/3.0/users/145884944174755256087575342095483601919"}'} + headers: + content-length: ['295'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/145884944174755256087575342095483601919/addresses + response: + body: {string: !!python/unicode '{"total_size": 2, "start": 0, "entries": [{"registered_on": + "2015-04-17T21:49:42.657259", "original_email": "anotheremail@example.com", + "user": "http://localhost:9001/3.0/users/145884944174755256087575342095483601919", + "http_etag": "\"248ed9ea7953084bc4d663ae5664fd356fdb5f17\"", "email": "anotheremail@example.com", + "self_link": "http://localhost:9001/3.0/addresses/anotheremail@example.com"}, + {"registered_on": "2015-04-17T21:49:42.533835", "original_email": "test@example.com", + "user": "http://localhost:9001/3.0/users/145884944174755256087575342095483601919", + "http_etag": "\"e50cdd0055f747a7471ce09a805b5f6ef2042a5f\"", "display_name": + "None", "email": "test@example.com", "self_link": "http://localhost:9001/3.0/addresses/test@example.com"}], + "http_etag": "\"00d92d9353dc6c04d46a655bacf8f841e944c062\""}'} + headers: + content-length: ['809'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:42.343674", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"767846dab52231da82d6bdef561038a43dfe6fb5\"", + "autorespond_owner": "none"}'} + headers: + content-length: ['1617'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:42.343674", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"767846dab52231da82d6bdef561038a43dfe6fb5\"", + "autorespond_owner": "none"}'} + headers: + content-length: ['1617'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml new file mode 100644 index 0000000..c9ce63c --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml @@ -0,0 +1,259 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: pre_confirmed=True&pre_verified=True&display_name=None&list_id=foo.example.com&subscriber=test%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/members + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + location: ['http://localhost:9001/3.0/members/292023913651303001152733356954878430707'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 1, "fqdn_listname": "foo@example.com", "http_etag": "\"98cc998d4a30293ec17da639bce10617912a6e1e\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '{"is_server_owner": false, "created_on": "2015-04-17T21:49:39.641823", + "http_etag": "\"37779fcd1a46be2b90a29cdb676b73f83115d03b\"", "user_id": 204817555931972815975639382460590167604, + "display_name": "None", "self_link": "http://localhost:9001/3.0/users/204817555931972815975639382460590167604"}'} + headers: + content-length: ['295'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/204817555931972815975639382460590167604 + response: + body: {string: !!python/unicode '{"is_server_owner": false, "created_on": "2015-04-17T21:49:39.641823", + "http_etag": "\"37779fcd1a46be2b90a29cdb676b73f83115d03b\"", "user_id": 204817555931972815975639382460590167604, + "display_name": "None", "self_link": "http://localhost:9001/3.0/users/204817555931972815975639382460590167604"}'} + headers: + content-length: ['295'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/204817555931972815975639382460590167604/addresses + response: + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"http_etag": + "\"d79e620e0f1ba72ef1d9d10b658fe28dfb8e860e\"", "registered_on": "2015-04-17T21:49:39.631542", + "original_email": "test@example.com", "user": "http://localhost:9001/3.0/users/204817555931972815975639382460590167604", + "verified_on": "2015-04-17T21:49:39.658421", "display_name": "None", "email": + "test@example.com", "self_link": "http://localhost:9001/3.0/addresses/test@example.com"}], + "http_etag": "\"28f0394a39cee45408687ef51ce699d4395ef91f\""}'} + headers: + content-length: ['501'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member + response: + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "member", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/test@example.com", "user": "http://localhost:9001/3.0/users/204817555931972815975639382460590167604", + "http_etag": "\"1684bdade9ea938bd38e3878afba2ef5508645c4\"", "member_id": + 292023913651303001152733356954878430707, "email": "test@example.com", "self_link": + "http://localhost:9001/3.0/members/292023913651303001152733356954878430707"}], + "http_etag": "\"ad978d7879e9efb6a630ad58273d6af958ab3d92\""}'} + headers: + content-length: ['565'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/members/292023913651303001152733356954878430707 + response: + body: {string: !!python/unicode '{"role": "member", "list_id": "foo.example.com", + "delivery_mode": "regular", "address": "http://localhost:9001/3.0/addresses/test@example.com", + "user": "http://localhost:9001/3.0/users/204817555931972815975639382460590167604", + "http_etag": "\"1684bdade9ea938bd38e3878afba2ef5508645c4\"", "member_id": + 292023913651303001152733356954878430707, "email": "test@example.com", "self_link": + "http://localhost:9001/3.0/members/292023913651303001152733356954878430707"}'} + headers: + content-length: ['460'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:39.501627", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"5a8dadbaf2ad92b296df371532b6fc2baf9953b2\"", + "autorespond_owner": "none"}'} + headers: + content-length: ['1617'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:39.501627", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"5a8dadbaf2ad92b296df371532b6fc2baf9953b2\"", + "autorespond_owner": "none"}'} + headers: + content-length: ['1617'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options.yaml index 1966385..0f8138a 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options.yaml @@ -12,7 +12,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:26 GMT'] + date: ['Fri, 17 Apr 2015 21:49:28 GMT'] location: ['http://localhost:9001/3.0/domains/example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:26 GMT'] + date: ['Fri, 17 Apr 2015 21:49:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -48,7 +47,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:26 GMT'] + date: ['Fri, 17 Apr 2015 21:49:28 GMT'] location: ['http://localhost:9001/3.0/lists/test_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -61,14 +60,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": - "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "test_list", "display_name": "Test_list", "list_id": "test_list.example.com", + "member_count": 0, "fqdn_listname": "test_list@example.com", "http_etag": + "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:26 GMT'] + date: ['Fri, 17 Apr 2015 21:49:28 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -80,12 +79,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", - "prototype": false, "mail-archive": true}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": true, "mail-archive": + true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\""}'} headers: content-length: ['120'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:26 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -97,14 +96,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": - "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "test_list", "display_name": "Test_list", "list_id": "test_list.example.com", + "member_count": 0, "fqdn_listname": "test_list@example.com", "http_etag": + "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -119,7 +118,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -136,7 +135,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -148,14 +147,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -167,14 +165,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -190,7 +187,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] location: ['http://localhost:9001/3.0/lists/test_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -203,14 +200,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": - "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "test_list", "display_name": "Test_list", "list_id": "test_list.example.com", + "member_count": 0, "fqdn_listname": "test_list@example.com", "http_etag": + "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -222,12 +219,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", - "prototype": false, "mail-archive": true}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": true, "mail-archive": + true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\""}'} headers: content-length: ['120'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -239,14 +236,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": - "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "test_list", "display_name": "Test_list", "list_id": "test_list.example.com", + "member_count": 0, "fqdn_listname": "test_list@example.com", "http_etag": + "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -261,7 +258,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -278,7 +275,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -290,14 +287,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -309,14 +305,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -332,7 +327,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] location: ['http://localhost:9001/3.0/lists/test_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -345,14 +340,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": - "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "test_list", "display_name": "Test_list", "list_id": "test_list.example.com", + "member_count": 0, "fqdn_listname": "test_list@example.com", "http_etag": + "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -364,12 +359,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", - "prototype": false, "mail-archive": true}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": true, "mail-archive": + true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\""}'} headers: content-length: ['120'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:29 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -384,7 +379,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_disable_archiver.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_disable_archiver.yaml index 665d386..5db4b07 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_disable_archiver.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_disable_archiver.yaml @@ -8,14 +8,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": - "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "test_list", "display_name": "Test_list", "list_id": "test_list.example.com", + "member_count": 0, "fqdn_listname": "test_list@example.com", "http_etag": + "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:27 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -27,16 +27,16 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\"", - "prototype": false, "mail-archive": true}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": true, "mail-archive": + true, "http_etag": "\"dfd159ec866aff2f484eb6399b59057ba112d3e5\""}'} headers: content-length: ['120'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: prototype=True&mhonarc=True&mail-archive=True + body: mail-archive=True&prototype=True&mhonarc=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -48,11 +48,11 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: - body: prototype=True&mhonarc=True&mail-archive=False + body: mail-archive=False&prototype=True&mhonarc=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -64,7 +64,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -76,12 +76,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\"", - "prototype": false, "mail-archive": false}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": true, "mail-archive": + false, "http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\""}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -93,12 +93,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\"", - "prototype": false, "mail-archive": false}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": true, "mail-archive": + false, "http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\""}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_enable_archiver.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_enable_archiver.yaml index aa0afe4..84e9235 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_enable_archiver.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_archival_options_enable_archiver.yaml @@ -8,14 +8,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com response: - body: {string: !!python/unicode '{"list_name": "test_list", "volume": 1, "list_id": - "test_list.example.com", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "fqdn_listname": "test_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Test_list", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "test_list", "display_name": "Test_list", "list_id": "test_list.example.com", + "member_count": 0, "fqdn_listname": "test_list@example.com", "http_etag": + "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", "self_link": "http://localhost:9001/3.0/lists/test_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -27,16 +27,16 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": true, "http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\"", - "prototype": false, "mail-archive": false}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": true, "mail-archive": + false, "http_etag": "\"95f97f6e3c57d856b8048a96844ddc64a972f96d\""}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: prototype=False&mhonarc=True&mail-archive=True + body: mail-archive=True&prototype=False&mhonarc=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -48,11 +48,11 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: - body: prototype=False&mhonarc=False&mail-archive=True + body: mail-archive=True&prototype=False&mhonarc=False headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -64,7 +64,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -76,12 +76,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": false, "http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\"", - "prototype": false, "mail-archive": true}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": false, "mail-archive": + true, "http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\""}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -93,12 +93,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test_list.example.com/archivers response: - body: {string: !!python/unicode '{"mhonarc": false, "http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\"", - "prototype": false, "mail-archive": true}'} + body: {string: !!python/unicode '{"prototype": false, "mhonarc": false, "mail-archive": + true, "http_etag": "\"de68e13c430d856461d2b39a5b5d5286d91528bc\""}'} headers: content-length: ['121'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:28 GMT'] + date: ['Fri, 17 Apr 2015 21:49:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml index b827f00..4efdd70 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_creation.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,15 +43,15 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", - "total_size": 1, "entries": [{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}], "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"base_url": + "http://example.com", "mail_host": "example.com", "description": null, "http_etag": + "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "url_host": "example.com", + "self_link": "http://localhost:9001/3.0/domains/example.com"}], "http_etag": + "\"c385b155f8da284bf78dbe075e20f58a30c893ab\""}'} headers: content-length: ['338'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -64,14 +63,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -83,14 +81,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -102,14 +99,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -125,7 +121,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] location: ['http://localhost:9001/3.0/lists/a_new_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -138,18 +134,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list.example.com response: - body: {string: !!python/unicode '{"list_name": "a_new_list", "volume": 1, "list_id": - "a_new_list.example.com", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", - "fqdn_listname": "a_new_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "A_new_list", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "a_new_list", "display_name": "A_new_list", "list_id": "a_new_list.example.com", + "member_count": 0, "fqdn_listname": "a_new_list@example.com", "http_etag": + "\"447e005af2b208bfea01f6425b786356f0a374de\"", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com"}'} headers: content-length: ['329'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: role=owner&list_id=a_new_list.example.com&subscriber=owner%40example.com + body: role=owner&subscriber=owner%40example.com&list_id=a_new_list.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -161,8 +157,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] - location: ['http://localhost:9001/3.0/members/312239441595958538887826064034848970852'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + location: ['http://localhost:9001/3.0/members/316848453783539995888912421307166844265'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -174,35 +170,35 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list@example.com/config response: - body: {string: !!python/unicode '{"list_name": "a_new_list", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "a_new_list-request@example.com", - "posting_address": "a_new_list@example.com", "first_strip_reply_to": false, - "http_etag": "\"4e97478ac8596ae25a8124bb6cfadd55d0e20b96\"", "administrivia": - true, "mail_host": "example.com", "include_rfc2369_headers": true, "admin_immed_notify": - true, "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": - true, "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "a_new_list-join@example.com", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "a_new_list@example.com", "allow_list_posts": true, "subject_prefix": "[A_new_list] - ", "owner_address": "a_new_list-owner@example.com", "archive_policy": "public", - "leave_address": "a_new_list-leave@example.com", "description": "", "acceptable_aliases": - [], "bounces_address": "a_new_list-bounces@example.com", "next_digest_number": - 1, "default_nonmember_action": "hold", "reply_goes_to_list": "no_munging", - "created_at": "2015-04-17T21:06:38.834999", "convert_html_to_plaintext": false, - "display_name": "A_new_list", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "a_new_list", + "reply_to_address": "", "next_digest_number": 1, "post_id": 1, "bounces_address": + "a_new_list-bounces@example.com", "posting_pipeline": "default-posting-pipeline", + "advertised": true, "no_reply_address": "noreply@example.com", "autoresponse_owner_text": + "", "last_post_at": null, "allow_list_posts": true, "join_address": "a_new_list-join@example.com", + "acceptable_aliases": [], "filter_content": false, "web_host": "example.com", + "default_member_action": "defer", "anonymous_list": false, "autorespond_postings": + "none", "leave_address": "a_new_list-leave@example.com", "autoresponse_postings_text": + "", "autoresponse_request_text": "", "description": "", "admin_immed_notify": + true, "collapse_alternatives": true, "archive_policy": "public", "send_welcome_message": + true, "created_at": "2015-04-17T21:49:44.843356", "include_rfc2369_headers": + true, "first_strip_reply_to": false, "welcome_message_uri": "mailman:///welcome.txt", + "administrivia": true, "digest_last_sent_at": null, "admin_notify_mchanges": + false, "digest_size_threshold": 30.0, "default_nonmember_action": "hold", + "subject_prefix": "[A_new_list] ", "request_address": "a_new_list-request@example.com", + "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": "no_munging", + "mail_host": "example.com", "autoresponse_grace_period": "90d", "subscription_policy": + "confirm", "display_name": "A_new_list", "convert_html_to_plaintext": false, + "owner_address": "a_new_list-owner@example.com", "fqdn_listname": "a_new_list@example.com", + "posting_address": "a_new_list@example.com", "http_etag": "\"364677602cff7bfcbc9138171ad0bbb8966af8ed\"", + "autorespond_owner": "none"}'} headers: content-length: ['1687'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: advertised=True&administrivia=True&subscription_policy=confirm&collapse_alternatives=True&admin_immed_notify=True&first_strip_reply_to=False&autoresponse_owner_text=&posting_pipeline=default-posting-pipeline&digest_size_threshold=30.0&allow_list_posts=True&autoresponse_request_text=&archive_policy=public&autorespond_postings=none&autoresponse_grace_period=90d&autorespond_owner=none&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&autorespond_requests=none&default_nonmember_action=hold&subject_prefix=%5BA_new_list%5D+&admin_notify_mchanges=False&include_rfc2369_headers=True&description=A+new+list.&reply_to_address=&anonymous_list=False&autoresponse_postings_text=&send_welcome_message=True&convert_html_to_plaintext=False&filter_content=False&default_member_action=defer&reply_goes_to_list=no_munging&display_name=A_new_list + body: description=A+new+list.&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&default_nonmember_action=hold&posting_pipeline=default-posting-pipeline&include_rfc2369_headers=True&autorespond_postings=none&first_strip_reply_to=False&collapse_alternatives=True&allow_list_posts=True&reply_to_address=&display_name=A_new_list&filter_content=False&default_member_action=defer&send_welcome_message=True&autorespond_owner=none&autoresponse_grace_period=90d&admin_notify_mchanges=False&autorespond_requests=none&digest_size_threshold=30.0&administrivia=True&autoresponse_request_text=&anonymous_list=False&subscription_policy=confirm&autoresponse_owner_text=&autoresponse_postings_text=&convert_html_to_plaintext=False&advertised=True&archive_policy=public&reply_goes_to_list=no_munging&subject_prefix=%5BA_new_list%5D+&admin_immed_notify=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -214,7 +210,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -226,14 +222,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list@example.com response: - body: {string: !!python/unicode '{"list_name": "a_new_list", "volume": 1, "list_id": - "a_new_list.example.com", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", - "fqdn_listname": "a_new_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "A_new_list", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "a_new_list", "display_name": "A_new_list", "list_id": "a_new_list.example.com", + "member_count": 0, "fqdn_listname": "a_new_list@example.com", "http_etag": + "\"447e005af2b208bfea01f6425b786356f0a374de\"", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com"}'} headers: content-length: ['329'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -245,17 +241,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"736d3820c7ed8ca5ccabd889347f202c5c6fe23f\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "owner@example.com", "address": "http://localhost:9001/3.0/addresses/owner@example.com", - "list_id": "a_new_list.example.com", "http_etag": "\"3a43d65adc806d8717bce5b65b4121c1ac6410b7\"", - "member_id": 312239441595958538887826064034848970852, "user": "http://localhost:9001/3.0/users/95044290017484342120664175382487617162", - "self_link": "http://localhost:9001/3.0/members/312239441595958538887826064034848970852"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "a_new_list.example.com", "delivery_mode": "regular", + "address": "http://localhost:9001/3.0/addresses/owner@example.com", "user": + "http://localhost:9001/3.0/users/22808733167350214741010478347477461329", + "http_etag": "\"230d436767bf3b5eeb49341741849a7c425dd1b5\"", "member_id": + 316848453783539995888912421307166844265, "email": "owner@example.com", "self_link": + "http://localhost:9001/3.0/members/316848453783539995888912421307166844265"}], + "http_etag": "\"6b44365e363eb3a4ff7c5fbb1378127c77277476\""}'} headers: content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -267,16 +264,16 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists response: - body: {string: !!python/unicode '{"http_etag": "\"dee96dcb9d3f736cc6fa170baeea8f879d7db6f0\"", - "total_size": 1, "entries": [{"list_name": "a_new_list", "volume": 1, "list_id": - "a_new_list.example.com", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", - "fqdn_listname": "a_new_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "A_new_list", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\""}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"volume": + 1, "mail_host": "example.com", "list_name": "a_new_list", "display_name": + "A_new_list", "list_id": "a_new_list.example.com", "member_count": 0, "fqdn_listname": + "a_new_list@example.com", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\"", + "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com"}], "http_etag": + "\"dee96dcb9d3f736cc6fa170baeea8f879d7db6f0\""}'} headers: content-length: ['434'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -288,14 +285,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/a_new_list.example.com response: - body: {string: !!python/unicode '{"list_name": "a_new_list", "volume": 1, "list_id": - "a_new_list.example.com", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", - "fqdn_listname": "a_new_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "A_new_list", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "a_new_list", "display_name": "A_new_list", "list_id": "a_new_list.example.com", + "member_count": 0, "fqdn_listname": "a_new_list@example.com", "http_etag": + "\"447e005af2b208bfea01f6425b786356f0a374de\"", "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com"}'} headers: content-length: ['329'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -310,7 +307,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -327,7 +324,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -339,14 +336,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -358,12 +354,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:39 GMT'] + date: ['Fri, 17 Apr 2015 21:49:45 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_index.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_index.yaml index c116263..36f5810 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_index.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_index.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,14 +43,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -67,7 +65,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -80,16 +78,15 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists response: - body: {string: !!python/unicode '{"http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "total_size": 1, "entries": [{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"volume": + 1, "mail_host": "example.com", "list_name": "foo", "display_name": "Foo", + "list_id": "foo.example.com", "member_count": 0, "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "self_link": + "http://localhost:9001/3.0/lists/foo.example.com"}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\""}'} headers: content-length: ['399'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -101,14 +98,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -120,30 +117,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", - "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": - "\"2f5094e9a18ff49e443fdf380686a324fe00c381\"", "administrivia": true, "mail_host": - "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": - "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", - "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", - "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": - "no_munging", "created_at": "2015-04-17T21:06:38.291968", "convert_html_to_plaintext": - false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:43.384633", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"1ec2b61b7c20b4896f60090e43838cc722a2f4ab\"", + "autorespond_owner": "none"}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -155,15 +152,15 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", - "total_size": 1, "entries": [{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}], "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"base_url": + "http://example.com", "mail_host": "example.com", "description": null, "http_etag": + "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", "url_host": "example.com", + "self_link": "http://localhost:9001/3.0/domains/example.com"}], "http_etag": + "\"c385b155f8da284bf78dbe075e20f58a30c893ab\""}'} headers: content-length: ['338'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -175,14 +172,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -194,30 +190,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", - "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": - "\"2f5094e9a18ff49e443fdf380686a324fe00c381\"", "administrivia": true, "mail_host": - "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": - "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", - "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", - "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": - "no_munging", "created_at": "2015-04-17T21:06:38.291968", "convert_html_to_plaintext": - false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:43.384633", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"1ec2b61b7c20b4896f60090e43838cc722a2f4ab\"", + "autorespond_owner": "none"}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -229,30 +225,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", - "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": - "\"2f5094e9a18ff49e443fdf380686a324fe00c381\"", "administrivia": true, "mail_host": - "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": - "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", - "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", - "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": - "no_munging", "created_at": "2015-04-17T21:06:38.291968", "convert_html_to_plaintext": - false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:43.384633", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"1ec2b61b7c20b4896f60090e43838cc722a2f4ab\"", + "autorespond_owner": "none"}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -264,16 +260,15 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists response: - body: {string: !!python/unicode '{"http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "total_size": 1, "entries": [{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"volume": + 1, "mail_host": "example.com", "list_name": "foo", "display_name": "Foo", + "list_id": "foo.example.com", "member_count": 0, "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "self_link": + "http://localhost:9001/3.0/lists/foo.example.com"}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\""}'} headers: content-length: ['399'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -285,14 +280,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -307,7 +302,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml index 5f8acd0..a3dd8ad 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,14 +43,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -67,7 +65,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -80,14 +78,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,12 +97,11 @@ 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\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -116,12 +113,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -133,16 +129,15 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: role=moderator&list_id=foo.example.com&subscriber=newmod%40example.com + body: role=moderator&subscriber=newmod%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -154,8 +149,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] - location: ['http://localhost:9001/3.0/members/244937454762324737467718684304844593898'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] + location: ['http://localhost:9001/3.0/members/329829655011474511559429401860720729232'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -167,12 +162,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -184,17 +178,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"dfb3e7da8895aeade05363634b283541a6a5ed47\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", - "email": "newmod@example.com", "address": "http://localhost:9001/3.0/addresses/newmod@example.com", - "list_id": "foo.example.com", "http_etag": "\"2742e6ecde3e5d149f3c72d11c29b3f095f77c92\"", - "member_id": 244937454762324737467718684304844593898, "user": "http://localhost:9001/3.0/users/326716575188604603029690470844928178966", - "self_link": "http://localhost:9001/3.0/members/244937454762324737467718684304844593898"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "moderator", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/newmod@example.com", "user": "http://localhost:9001/3.0/users/132323735783051238959108775541333078032", + "http_etag": "\"4c3e3aa74124d0a32fd975ee77a56823786d8f11\"", "member_id": + 329829655011474511559429401860720729232, "email": "newmod@example.com", "self_link": + "http://localhost:9001/3.0/members/329829655011474511559429401860720729232"}], + "http_etag": "\"8ff8a8d1797518c87870e4a93547a0e6391ef752\""}'} headers: content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -206,17 +200,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"dfb3e7da8895aeade05363634b283541a6a5ed47\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", - "email": "newmod@example.com", "address": "http://localhost:9001/3.0/addresses/newmod@example.com", - "list_id": "foo.example.com", "http_etag": "\"2742e6ecde3e5d149f3c72d11c29b3f095f77c92\"", - "member_id": 244937454762324737467718684304844593898, "user": "http://localhost:9001/3.0/users/326716575188604603029690470844928178966", - "self_link": "http://localhost:9001/3.0/members/244937454762324737467718684304844593898"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "moderator", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/newmod@example.com", "user": "http://localhost:9001/3.0/users/132323735783051238959108775541333078032", + "http_etag": "\"4c3e3aa74124d0a32fd975ee77a56823786d8f11\"", "member_id": + 329829655011474511559429401860720729232, "email": "newmod@example.com", "self_link": + "http://localhost:9001/3.0/members/329829655011474511559429401860720729232"}], + "http_etag": "\"8ff8a8d1797518c87870e4a93547a0e6391ef752\""}'} headers: content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -228,14 +222,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -250,7 +244,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml index 588a630..399588c 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,14 +43,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -67,7 +65,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -80,14 +78,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,12 +97,11 @@ 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\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -116,12 +113,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -133,16 +129,15 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: role=owner&list_id=foo.example.com&subscriber=newowner%40example.com + body: role=owner&subscriber=newowner%40example.com&list_id=foo.example.com headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -154,8 +149,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] - location: ['http://localhost:9001/3.0/members/205938900403193169744608364383040344630'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] + location: ['http://localhost:9001/3.0/members/199077213040643750575866640090489284641'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -167,17 +162,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"189efb90bc8c0c5fe25d74afc449b6a405c9195b\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "newowner@example.com", "address": "http://localhost:9001/3.0/addresses/newowner@example.com", - "list_id": "foo.example.com", "http_etag": "\"2b93487540419e20335f17f4c98f47c7d918b415\"", - "member_id": 205938900403193169744608364383040344630, "user": "http://localhost:9001/3.0/users/134264009653686833174579232298647003963", - "self_link": "http://localhost:9001/3.0/members/205938900403193169744608364383040344630"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/newowner@example.com", "user": "http://localhost:9001/3.0/users/244378695232085659502002763818624648484", + "http_etag": "\"26b16e58236be821c8d641c9524a0724f0acb412\"", "member_id": + 199077213040643750575866640090489284641, "email": "newowner@example.com", + "self_link": "http://localhost:9001/3.0/members/199077213040643750575866640090489284641"}], + "http_etag": "\"ea282a57c7d70b159cce136e3af20ac54090c030\""}'} headers: content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -189,12 +184,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -206,17 +200,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"189efb90bc8c0c5fe25d74afc449b6a405c9195b\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "newowner@example.com", "address": "http://localhost:9001/3.0/addresses/newowner@example.com", - "list_id": "foo.example.com", "http_etag": "\"2b93487540419e20335f17f4c98f47c7d918b415\"", - "member_id": 205938900403193169744608364383040344630, "user": "http://localhost:9001/3.0/users/134264009653686833174579232298647003963", - "self_link": "http://localhost:9001/3.0/members/205938900403193169744608364383040344630"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/newowner@example.com", "user": "http://localhost:9001/3.0/users/244378695232085659502002763818624648484", + "http_etag": "\"26b16e58236be821c8d641c9524a0724f0acb412\"", "member_id": + 199077213040643750575866640090489284641, "email": "newowner@example.com", + "self_link": "http://localhost:9001/3.0/members/199077213040643750575866640090489284641"}], + "http_etag": "\"ea282a57c7d70b159cce136e3af20ac54090c030\""}'} headers: content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -228,14 +222,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -250,7 +244,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner_new_owner_added.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner_new_owner_added.yaml index 9ebd657..28f74d9 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner_new_owner_added.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner_new_owner_added.yaml @@ -8,17 +8,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"189efb90bc8c0c5fe25d74afc449b6a405c9195b\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "owner", - "email": "newowner@example.com", "address": "http://localhost:9001/3.0/addresses/newowner@example.com", - "list_id": "foo.example.com", "http_etag": "\"2b93487540419e20335f17f4c98f47c7d918b415\"", - "member_id": 205938900403193169744608364383040344630, "user": "http://localhost:9001/3.0/users/134264009653686833174579232298647003963", - "self_link": "http://localhost:9001/3.0/members/205938900403193169744608364383040344630"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "owner", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/newowner@example.com", "user": "http://localhost:9001/3.0/users/244378695232085659502002763818624648484", + "http_etag": "\"26b16e58236be821c8d641c9524a0724f0acb412\"", "member_id": + 199077213040643750575866640090489284641, "email": "newowner@example.com", + "self_link": "http://localhost:9001/3.0/members/199077213040643750575866640090489284641"}], + "http_etag": "\"ea282a57c7d70b159cce136e3af20ac54090c030\""}'} headers: content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:31 GMT'] + date: ['Fri, 17 Apr 2015 21:49:33 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml index ba4a800..ab1c6f9 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml @@ -8,17 +8,17 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"dfb3e7da8895aeade05363634b283541a6a5ed47\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "moderator", - "email": "newmod@example.com", "address": "http://localhost:9001/3.0/addresses/newmod@example.com", - "list_id": "foo.example.com", "http_etag": "\"2742e6ecde3e5d149f3c72d11c29b3f095f77c92\"", - "member_id": 244937454762324737467718684304844593898, "user": "http://localhost:9001/3.0/users/326716575188604603029690470844928178966", - "self_link": "http://localhost:9001/3.0/members/244937454762324737467718684304844593898"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "moderator", "list_id": "foo.example.com", "delivery_mode": "regular", "address": + "http://localhost:9001/3.0/addresses/newmod@example.com", "user": "http://localhost:9001/3.0/users/132323735783051238959108775541333078032", + "http_etag": "\"4c3e3aa74124d0a32fd975ee77a56823786d8f11\"", "member_id": + 329829655011474511559429401860720729232, "email": "newmod@example.com", "self_link": + "http://localhost:9001/3.0/members/329829655011474511559429401860720729232"}], + "http_etag": "\"8ff8a8d1797518c87870e4a93547a0e6391ef752\""}'} headers: content-length: ['572'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml index 8c09397..936ba1f 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml @@ -12,7 +12,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] location: ['http://localhost:9001/3.0/domains/example.org'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.org response: - body: {string: !!python/unicode '{"mail_host": "example.org", "description": null, - "base_url": "http://example.org", "http_etag": "\"f8247f55d4a0a1d987c89cc238bb0dbc2c0e1089\"", - "self_link": "http://localhost:9001/3.0/domains/example.org", "url_host": - "example.org"}'} + body: {string: !!python/unicode '{"base_url": "http://example.org", "mail_host": + "example.org", "description": null, "http_etag": "\"f8247f55d4a0a1d987c89cc238bb0dbc2c0e1089\"", + "url_host": "example.org", "self_link": "http://localhost:9001/3.0/domains/example.org"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -48,7 +47,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] location: ['http://localhost:9001/3.0/lists/test.example.org'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -61,14 +60,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org response: - body: {string: !!python/unicode '{"list_name": "test", "volume": 1, "list_id": - "test.example.org", "self_link": "http://localhost:9001/3.0/lists/test.example.org", - "fqdn_listname": "test@example.org", "mail_host": "example.org", "member_count": - 0, "display_name": "Test", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.org", "list_name": + "test", "display_name": "Test", "list_id": "test.example.org", "member_count": + 0, "fqdn_listname": "test@example.org", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\"", + "self_link": "http://localhost:9001/3.0/lists/test.example.org"}'} headers: content-length: ['299'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -80,14 +79,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org response: - body: {string: !!python/unicode '{"list_name": "test", "volume": 1, "list_id": - "test.example.org", "self_link": "http://localhost:9001/3.0/lists/test.example.org", - "fqdn_listname": "test@example.org", "mail_host": "example.org", "member_count": - 0, "display_name": "Test", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.org", "list_name": + "test", "display_name": "Test", "list_id": "test.example.org", "member_count": + 0, "fqdn_listname": "test@example.org", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\"", + "self_link": "http://localhost:9001/3.0/lists/test.example.org"}'} headers: content-length: ['299'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,12 +98,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test.example.org/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -116,12 +114,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test.example.org/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -133,31 +130,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org/config response: - body: {string: !!python/unicode '{"list_name": "test", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.org", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "test-request@example.org", - "posting_address": "test@example.org", "first_strip_reply_to": false, "http_etag": - "\"5bec8629f56043f9353337168030dc506fceac83\"", "administrivia": true, "mail_host": - "example.org", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "test-join@example.org", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "test@example.org", "allow_list_posts": true, "subject_prefix": "[Test] ", - "owner_address": "test-owner@example.org", "archive_policy": "public", "leave_address": - "test-leave@example.org", "description": "", "acceptable_aliases": [], "bounces_address": - "test-bounces@example.org", "next_digest_number": 1, "default_nonmember_action": - "hold", "reply_goes_to_list": "no_munging", "created_at": "2015-04-17T21:06:36.091279", - "convert_html_to_plaintext": false, "display_name": "Test", "autorespond_requests": - "none", "no_reply_address": "noreply@example.org", "digest_last_sent_at": - null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "test", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "test-bounces@example.org", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.org", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "test-join@example.org", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.org", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "test-leave@example.org", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:38.369752", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Test] ", "request_address": + "test-request@example.org", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.org", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Test", "convert_html_to_plaintext": + false, "owner_address": "test-owner@example.org", "fqdn_listname": "test@example.org", + "posting_address": "test@example.org", "http_etag": "\"fc7e6717b92d81b34233b33056f426ffe5b27481\"", + "autorespond_owner": "none"}'} headers: content-length: ['1627'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -169,31 +165,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org/config response: - body: {string: !!python/unicode '{"list_name": "test", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.org", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "test-request@example.org", - "posting_address": "test@example.org", "first_strip_reply_to": false, "http_etag": - "\"5bec8629f56043f9353337168030dc506fceac83\"", "administrivia": true, "mail_host": - "example.org", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "test-join@example.org", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "test@example.org", "allow_list_posts": true, "subject_prefix": "[Test] ", - "owner_address": "test-owner@example.org", "archive_policy": "public", "leave_address": - "test-leave@example.org", "description": "", "acceptable_aliases": [], "bounces_address": - "test-bounces@example.org", "next_digest_number": 1, "default_nonmember_action": - "hold", "reply_goes_to_list": "no_munging", "created_at": "2015-04-17T21:06:36.091279", - "convert_html_to_plaintext": false, "display_name": "Test", "autorespond_requests": - "none", "no_reply_address": "noreply@example.org", "digest_last_sent_at": - null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "test", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "test-bounces@example.org", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.org", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "test-join@example.org", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.org", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "test-leave@example.org", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:38.369752", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Test] ", "request_address": + "test-request@example.org", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.org", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Test", "convert_html_to_plaintext": + false, "owner_address": "test-owner@example.org", "fqdn_listname": "test@example.org", + "posting_address": "test@example.org", "http_etag": "\"fc7e6717b92d81b34233b33056f426ffe5b27481\"", + "autorespond_owner": "none"}'} headers: content-length: ['1627'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -205,31 +200,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org/config response: - body: {string: !!python/unicode '{"list_name": "test", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.org", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "test-request@example.org", - "posting_address": "test@example.org", "first_strip_reply_to": false, "http_etag": - "\"5bec8629f56043f9353337168030dc506fceac83\"", "administrivia": true, "mail_host": - "example.org", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "test-join@example.org", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "test@example.org", "allow_list_posts": true, "subject_prefix": "[Test] ", - "owner_address": "test-owner@example.org", "archive_policy": "public", "leave_address": - "test-leave@example.org", "description": "", "acceptable_aliases": [], "bounces_address": - "test-bounces@example.org", "next_digest_number": 1, "default_nonmember_action": - "hold", "reply_goes_to_list": "no_munging", "created_at": "2015-04-17T21:06:36.091279", - "convert_html_to_plaintext": false, "display_name": "Test", "autorespond_requests": - "none", "no_reply_address": "noreply@example.org", "digest_last_sent_at": - null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "test", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "test-bounces@example.org", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.org", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "test-join@example.org", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.org", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "test-leave@example.org", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:38.369752", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Test] ", "request_address": + "test-request@example.org", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.org", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Test", "convert_html_to_plaintext": + false, "owner_address": "test-owner@example.org", "fqdn_listname": "test@example.org", + "posting_address": "test@example.org", "http_etag": "\"fc7e6717b92d81b34233b33056f426ffe5b27481\"", + "autorespond_owner": "none"}'} headers: content-length: ['1627'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -241,31 +235,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org/config response: - body: {string: !!python/unicode '{"list_name": "test", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.org", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "test-request@example.org", - "posting_address": "test@example.org", "first_strip_reply_to": false, "http_etag": - "\"5bec8629f56043f9353337168030dc506fceac83\"", "administrivia": true, "mail_host": - "example.org", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "test-join@example.org", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "test@example.org", "allow_list_posts": true, "subject_prefix": "[Test] ", - "owner_address": "test-owner@example.org", "archive_policy": "public", "leave_address": - "test-leave@example.org", "description": "", "acceptable_aliases": [], "bounces_address": - "test-bounces@example.org", "next_digest_number": 1, "default_nonmember_action": - "hold", "reply_goes_to_list": "no_munging", "created_at": "2015-04-17T21:06:36.091279", - "convert_html_to_plaintext": false, "display_name": "Test", "autorespond_requests": - "none", "no_reply_address": "noreply@example.org", "digest_last_sent_at": - null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "test", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "test-bounces@example.org", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.org", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "test-join@example.org", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.org", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "test-leave@example.org", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:38.369752", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Test] ", "request_address": + "test-request@example.org", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.org", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Test", "convert_html_to_plaintext": + false, "owner_address": "test-owner@example.org", "fqdn_listname": "test@example.org", + "posting_address": "test@example.org", "http_etag": "\"fc7e6717b92d81b34233b33056f426ffe5b27481\"", + "autorespond_owner": "none"}'} headers: content-length: ['1627'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -280,7 +273,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -295,7 +288,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -311,7 +304,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] location: ['http://localhost:9001/3.0/domains/example.org'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -324,14 +317,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.org response: - body: {string: !!python/unicode '{"mail_host": "example.org", "description": null, - "base_url": "http://example.org", "http_etag": "\"f8247f55d4a0a1d987c89cc238bb0dbc2c0e1089\"", - "self_link": "http://localhost:9001/3.0/domains/example.org", "url_host": - "example.org"}'} + body: {string: !!python/unicode '{"base_url": "http://example.org", "mail_host": + "example.org", "description": null, "http_etag": "\"f8247f55d4a0a1d987c89cc238bb0dbc2c0e1089\"", + "url_host": "example.org", "self_link": "http://localhost:9001/3.0/domains/example.org"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:38 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -347,7 +339,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] location: ['http://localhost:9001/3.0/lists/test.example.org'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -360,14 +352,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org response: - body: {string: !!python/unicode '{"list_name": "test", "volume": 1, "list_id": - "test.example.org", "self_link": "http://localhost:9001/3.0/lists/test.example.org", - "fqdn_listname": "test@example.org", "mail_host": "example.org", "member_count": - 0, "display_name": "Test", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.org", "list_name": + "test", "display_name": "Test", "list_id": "test.example.org", "member_count": + 0, "fqdn_listname": "test@example.org", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\"", + "self_link": "http://localhost:9001/3.0/lists/test.example.org"}'} headers: content-length: ['299'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -379,14 +371,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org response: - body: {string: !!python/unicode '{"list_name": "test", "volume": 1, "list_id": - "test.example.org", "self_link": "http://localhost:9001/3.0/lists/test.example.org", - "fqdn_listname": "test@example.org", "mail_host": "example.org", "member_count": - 0, "display_name": "Test", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.org", "list_name": + "test", "display_name": "Test", "list_id": "test.example.org", "member_count": + 0, "fqdn_listname": "test@example.org", "http_etag": "\"bdbe0068d985e63808436177de1063200d586b0d\"", + "self_link": "http://localhost:9001/3.0/lists/test.example.org"}'} headers: content-length: ['299'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:36 GMT'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -401,7 +393,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -416,7 +408,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml index 264490d..cd34126 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,14 +43,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -67,7 +65,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] location: ['http://localhost:9001/3.0/lists/open_list.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -80,14 +78,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/open_list.example.com response: - body: {string: !!python/unicode '{"list_name": "open_list", "volume": 1, "list_id": - "open_list.example.com", "self_link": "http://localhost:9001/3.0/lists/open_list.example.com", - "fqdn_listname": "open_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Open_list", "http_etag": "\"6726e101e1dd1de6043eee72f741d4c2479f4735\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "open_list", "display_name": "Open_list", "list_id": "open_list.example.com", + "member_count": 0, "fqdn_listname": "open_list@example.com", "http_etag": + "\"6726e101e1dd1de6043eee72f741d4c2479f4735\"", "self_link": "http://localhost:9001/3.0/lists/open_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,35 +97,35 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/open_list@example.com/config response: - body: {string: !!python/unicode '{"list_name": "open_list", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "open_list-request@example.com", - "posting_address": "open_list@example.com", "first_strip_reply_to": false, - "http_etag": "\"4949c883ec5b6f02d74c3bdb9e8d491c964eb20a\"", "administrivia": - true, "mail_host": "example.com", "include_rfc2369_headers": true, "admin_immed_notify": - true, "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": - true, "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "open_list-join@example.com", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "open_list@example.com", "allow_list_posts": true, "subject_prefix": "[Open_list] - ", "owner_address": "open_list-owner@example.com", "archive_policy": "public", - "leave_address": "open_list-leave@example.com", "description": "", "acceptable_aliases": - [], "bounces_address": "open_list-bounces@example.com", "next_digest_number": - 1, "default_nonmember_action": "hold", "reply_goes_to_list": "no_munging", - "created_at": "2015-04-17T21:06:29.676463", "convert_html_to_plaintext": false, - "display_name": "Open_list", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "open_list", + "reply_to_address": "", "next_digest_number": 1, "post_id": 1, "bounces_address": + "open_list-bounces@example.com", "posting_pipeline": "default-posting-pipeline", + "advertised": true, "no_reply_address": "noreply@example.com", "autoresponse_owner_text": + "", "last_post_at": null, "allow_list_posts": true, "join_address": "open_list-join@example.com", + "acceptable_aliases": [], "filter_content": false, "web_host": "example.com", + "default_member_action": "defer", "anonymous_list": false, "autorespond_postings": + "none", "leave_address": "open_list-leave@example.com", "autoresponse_postings_text": + "", "autoresponse_request_text": "", "description": "", "admin_immed_notify": + true, "collapse_alternatives": true, "archive_policy": "public", "send_welcome_message": + true, "created_at": "2015-04-17T21:49:31.855986", "include_rfc2369_headers": + true, "first_strip_reply_to": false, "welcome_message_uri": "mailman:///welcome.txt", + "administrivia": true, "digest_last_sent_at": null, "admin_notify_mchanges": + false, "digest_size_threshold": 30.0, "default_nonmember_action": "hold", + "subject_prefix": "[Open_list] ", "request_address": "open_list-request@example.com", + "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": "no_munging", + "mail_host": "example.com", "autoresponse_grace_period": "90d", "subscription_policy": + "confirm", "display_name": "Open_list", "convert_html_to_plaintext": false, + "owner_address": "open_list-owner@example.com", "fqdn_listname": "open_list@example.com", + "posting_address": "open_list@example.com", "http_etag": "\"14c8601b64e2e545855b5d52991f5a35d2a26c00\"", + "autorespond_owner": "none"}'} headers: content-length: ['1677'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: advertised=True&administrivia=True&subscription_policy=open&collapse_alternatives=True&admin_immed_notify=True&first_strip_reply_to=False&autoresponse_owner_text=&posting_pipeline=default-posting-pipeline&digest_size_threshold=30.0&allow_list_posts=True&autoresponse_request_text=&archive_policy=public&autorespond_postings=none&autoresponse_grace_period=90d&autorespond_owner=none&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&autorespond_requests=none&default_nonmember_action=hold&subject_prefix=%5BOpen_list%5D+&admin_notify_mchanges=False&include_rfc2369_headers=True&description=&reply_to_address=&anonymous_list=False&autoresponse_postings_text=&send_welcome_message=True&convert_html_to_plaintext=False&filter_content=False&default_member_action=defer&reply_goes_to_list=no_munging&display_name=Open_list + body: description=&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&default_nonmember_action=hold&posting_pipeline=default-posting-pipeline&include_rfc2369_headers=True&autorespond_postings=none&first_strip_reply_to=False&collapse_alternatives=True&allow_list_posts=True&reply_to_address=&display_name=Open_list&filter_content=False&default_member_action=defer&send_welcome_message=True&autorespond_owner=none&autoresponse_grace_period=90d&admin_notify_mchanges=False&autorespond_requests=none&digest_size_threshold=30.0&administrivia=True&autoresponse_request_text=&anonymous_list=False&subscription_policy=open&autoresponse_owner_text=&autoresponse_postings_text=&convert_html_to_plaintext=False&advertised=True&archive_policy=public&reply_goes_to_list=no_munging&subject_prefix=%5BOpen_list%5D+&admin_immed_notify=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -139,7 +137,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -151,14 +149,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/open_list.example.com response: - body: {string: !!python/unicode '{"list_name": "open_list", "volume": 1, "list_id": - "open_list.example.com", "self_link": "http://localhost:9001/3.0/lists/open_list.example.com", - "fqdn_listname": "open_list@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Open_list", "http_etag": "\"6726e101e1dd1de6043eee72f741d4c2479f4735\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "open_list", "display_name": "Open_list", "list_id": "open_list.example.com", + "member_count": 0, "fqdn_listname": "open_list@example.com", "http_etag": + "\"6726e101e1dd1de6043eee72f741d4c2479f4735\"", "self_link": "http://localhost:9001/3.0/lists/open_list.example.com"}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -170,12 +168,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/open_list.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -187,16 +184,31 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/open_list.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: pre_verified=True&list_id=open_list.example.com&display_name=None&pre_confirmed=True&subscriber=fritz%40example.org + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '404 Not Found'} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: pre_confirmed=True&pre_verified=True&display_name=None&list_id=open_list.example.com&subscriber=fritz%40example.org headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -208,8 +220,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] - location: ['http://localhost:9001/3.0/members/219379763871340832809046435098342039931'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] + location: ['http://localhost:9001/3.0/members/18081351744234027240302805384361051228'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} - request: @@ -221,17 +233,18 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/open_list@example.com/roster/member response: - body: {string: !!python/unicode '{"http_etag": "\"2bcb03c8560a7d7b0de36a5573530e7b34734f6a\"", - "total_size": 1, "entries": [{"delivery_mode": "regular", "role": "member", - "email": "fritz@example.org", "address": "http://localhost:9001/3.0/addresses/fritz@example.org", - "list_id": "open_list.example.com", "http_etag": "\"487ae31099afaa824f32e8272c026094cff7f856\"", - "member_id": 219379763871340832809046435098342039931, "user": "http://localhost:9001/3.0/users/45245778716836160890668793583968810730", - "self_link": "http://localhost:9001/3.0/members/219379763871340832809046435098342039931"}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"role": + "member", "list_id": "open_list.example.com", "delivery_mode": "regular", + "address": "http://localhost:9001/3.0/addresses/fritz@example.org", "user": + "http://localhost:9001/3.0/users/73132381270437761542061997858084787124", + "http_etag": "\"5fe0e13160405b8198ff6e9d3db02c78bbf1f8e5\"", "member_id": + 18081351744234027240302805384361051228, "email": "fritz@example.org", "self_link": + "http://localhost:9001/3.0/members/18081351744234027240302805384361051228"}], + "http_etag": "\"b6d537f346e4aa26a84ccc654e59072bc6690e4f\""}'} headers: - content-length: ['572'] + content-length: ['570'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -243,12 +256,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/open_list@example.com/requests response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -263,7 +275,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:30 GMT'] + date: ['Fri, 17 Apr 2015 21:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml index c95f3a7..e9b2b08 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,14 +43,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -67,7 +65,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] location: ['http://localhost:9001/3.0/lists/moderate_subs.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -80,14 +78,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/moderate_subs.example.com response: - body: {string: !!python/unicode '{"list_name": "moderate_subs", "volume": 1, "list_id": - "moderate_subs.example.com", "self_link": "http://localhost:9001/3.0/lists/moderate_subs.example.com", - "fqdn_listname": "moderate_subs@example.com", "mail_host": "example.com", - "member_count": 0, "display_name": "Moderate_subs", "http_etag": "\"4cf5a031a451ad84a54e4c708cacda8e676e617f\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "moderate_subs", "display_name": "Moderate_subs", "list_id": "moderate_subs.example.com", + "member_count": 0, "fqdn_listname": "moderate_subs@example.com", "http_etag": + "\"4cf5a031a451ad84a54e4c708cacda8e676e617f\"", "self_link": "http://localhost:9001/3.0/lists/moderate_subs.example.com"}'} headers: content-length: ['344'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -99,35 +97,35 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/config response: - body: {string: !!python/unicode '{"list_name": "moderate_subs", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "moderate_subs-request@example.com", - "posting_address": "moderate_subs@example.com", "first_strip_reply_to": false, - "http_etag": "\"9b93ebb3a0223bb225b30f8793f6ad3f3c937b4c\"", "administrivia": - true, "mail_host": "example.com", "include_rfc2369_headers": true, "admin_immed_notify": - true, "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": - true, "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "moderate_subs-join@example.com", "scheme": "http", "subscription_policy": - "confirm", "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, - "fqdn_listname": "moderate_subs@example.com", "allow_list_posts": true, "subject_prefix": - "[Moderate_subs] ", "owner_address": "moderate_subs-owner@example.com", "archive_policy": - "public", "leave_address": "moderate_subs-leave@example.com", "description": - "", "acceptable_aliases": [], "bounces_address": "moderate_subs-bounces@example.com", - "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": - "no_munging", "created_at": "2015-04-17T21:06:29.031666", "convert_html_to_plaintext": - false, "display_name": "Moderate_subs", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "moderate_subs", + "reply_to_address": "", "next_digest_number": 1, "post_id": 1, "bounces_address": + "moderate_subs-bounces@example.com", "posting_pipeline": "default-posting-pipeline", + "advertised": true, "no_reply_address": "noreply@example.com", "autoresponse_owner_text": + "", "last_post_at": null, "allow_list_posts": true, "join_address": "moderate_subs-join@example.com", + "acceptable_aliases": [], "filter_content": false, "web_host": "example.com", + "default_member_action": "defer", "anonymous_list": false, "autorespond_postings": + "none", "leave_address": "moderate_subs-leave@example.com", "autoresponse_postings_text": + "", "autoresponse_request_text": "", "description": "", "admin_immed_notify": + true, "collapse_alternatives": true, "archive_policy": "public", "send_welcome_message": + true, "created_at": "2015-04-17T21:49:31.087072", "include_rfc2369_headers": + true, "first_strip_reply_to": false, "welcome_message_uri": "mailman:///welcome.txt", + "administrivia": true, "digest_last_sent_at": null, "admin_notify_mchanges": + false, "digest_size_threshold": 30.0, "default_nonmember_action": "hold", + "subject_prefix": "[Moderate_subs] ", "request_address": "moderate_subs-request@example.com", + "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": "no_munging", + "mail_host": "example.com", "autoresponse_grace_period": "90d", "subscription_policy": + "confirm", "display_name": "Moderate_subs", "convert_html_to_plaintext": false, + "owner_address": "moderate_subs-owner@example.com", "fqdn_listname": "moderate_subs@example.com", + "posting_address": "moderate_subs@example.com", "http_etag": "\"3891fa3ee9d98bf20c634f4bc3c1d4a775e05554\"", + "autorespond_owner": "none"}'} headers: content-length: ['1717'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: advertised=True&administrivia=True&subscription_policy=moderate&collapse_alternatives=True&admin_immed_notify=True&first_strip_reply_to=False&autoresponse_owner_text=&posting_pipeline=default-posting-pipeline&digest_size_threshold=30.0&allow_list_posts=True&autoresponse_request_text=&archive_policy=public&autorespond_postings=none&autoresponse_grace_period=90d&autorespond_owner=none&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&autorespond_requests=none&default_nonmember_action=hold&subject_prefix=%5BModerate_subs%5D+&admin_notify_mchanges=False&include_rfc2369_headers=True&description=&reply_to_address=&anonymous_list=False&autoresponse_postings_text=&send_welcome_message=True&convert_html_to_plaintext=False&filter_content=False&default_member_action=defer&reply_goes_to_list=no_munging&display_name=Moderate_subs + body: description=&welcome_message_uri=mailman%3A%2F%2F%2Fwelcome.txt&default_nonmember_action=hold&posting_pipeline=default-posting-pipeline&include_rfc2369_headers=True&autorespond_postings=none&first_strip_reply_to=False&collapse_alternatives=True&allow_list_posts=True&reply_to_address=&display_name=Moderate_subs&filter_content=False&default_member_action=defer&send_welcome_message=True&autorespond_owner=none&autoresponse_grace_period=90d&admin_notify_mchanges=False&autorespond_requests=none&digest_size_threshold=30.0&administrivia=True&autoresponse_request_text=&anonymous_list=False&subscription_policy=moderate&autoresponse_owner_text=&autoresponse_postings_text=&convert_html_to_plaintext=False&advertised=True&archive_policy=public&reply_goes_to_list=no_munging&subject_prefix=%5BModerate_subs%5D+&admin_immed_notify=True headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -139,7 +137,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -151,14 +149,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/moderate_subs.example.com response: - body: {string: !!python/unicode '{"list_name": "moderate_subs", "volume": 1, "list_id": - "moderate_subs.example.com", "self_link": "http://localhost:9001/3.0/lists/moderate_subs.example.com", - "fqdn_listname": "moderate_subs@example.com", "mail_host": "example.com", - "member_count": 0, "display_name": "Moderate_subs", "http_etag": "\"4cf5a031a451ad84a54e4c708cacda8e676e617f\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "moderate_subs", "display_name": "Moderate_subs", "list_id": "moderate_subs.example.com", + "member_count": 0, "fqdn_listname": "moderate_subs@example.com", "http_etag": + "\"4cf5a031a451ad84a54e4c708cacda8e676e617f\"", "self_link": "http://localhost:9001/3.0/lists/moderate_subs.example.com"}'} headers: content-length: ['344'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -170,12 +168,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/moderate_subs.example.com/roster/owner response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -187,16 +184,31 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/moderate_subs.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: - body: pre_verified=True&list_id=moderate_subs.example.com&display_name=None&pre_confirmed=True&subscriber=fritz%40example.org + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '404 Not Found'} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: pre_confirmed=True&pre_verified=True&display_name=None&list_id=moderate_subs.example.com&subscriber=fritz%40example.org headers: accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] @@ -205,12 +217,13 @@ method: !!python/unicode 'POST' uri: http://localhost:9001/3.0/members response: - body: {string: !!python/unicode '{"token_owner": "moderator", "token": "0d68d98345d6f9e6aeff7b07fbcb9b38d32e3d99", - "http_etag": "\"35c29bdc6bed1e508941e196bef439f518b6bb9d\""}'} + body: {string: !!python/unicode '{"token": "19525c71ea30da54045e5fa4d691af14aebaef79", + "http_etag": "\"7ab02ea16f8d127d4799a19f45c5a404b19bc48e\"", "token_owner": + "moderator"}'} headers: content-length: ['142'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 202, message: Accepted} - request: @@ -222,12 +235,11 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/roster/member response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -239,15 +251,15 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/requests response: - body: {string: !!python/unicode '{"http_etag": "\"9db1bd05d994bb92bac0e2d60006db385b1109e3\"", - "total_size": 1, "entries": [{"http_etag": "\"36d7b15da47d1fb264f929b7f6a105c5a3e81743\"", - "email": "fritz@example.org", "list_id": "moderate_subs.example.com", "when": - "2015-04-17T21:06:29", "display_name": "None", "token_owner": "moderator", - "token": "0d68d98345d6f9e6aeff7b07fbcb9b38d32e3d99"}], "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"token": + "19525c71ea30da54045e5fa4d691af14aebaef79", "when": "2015-04-17T21:49:31", + "list_id": "moderate_subs.example.com", "token_owner": "moderator", "http_etag": + "\"ded8aafef6e4b383ba4103bcdc31394738b62fbc\"", "display_name": "None", "email": + "fritz@example.org"}], "http_etag": "\"dda7a413f195e045b751c95587624588064d6c6c\""}'} headers: content-length: ['372'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -262,7 +274,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:29 GMT'] + date: ['Fri, 17 Apr 2015 21:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml index f2a2c68..e3d5876 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml @@ -13,7 +13,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -25,14 +25,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -44,14 +43,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -67,7 +65,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:39 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -78,158 +76,17 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo@example.com - response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] - method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] - method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] - method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] - method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", - "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": - "\"b455b28a01cbf6d739201ca283c72fe1d4d9ac0d\"", "administrivia": true, "mail_host": - "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": - "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", - "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", - "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": - "no_munging", "created_at": "2015-04-17T21:06:37.251533", "convert_html_to_plaintext": - false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} - headers: - content-length: ['1617'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] - method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", - "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": - "\"b455b28a01cbf6d739201ca283c72fe1d4d9ac0d\"", "administrivia": true, "mail_host": - "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": - "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", - "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", - "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": - "no_munging", "created_at": "2015-04-17T21:06:37.251533", "convert_html_to_plaintext": - false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} - headers: - content-length: ['1617'] - content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] - method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists response: - body: {string: !!python/unicode '{"http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "total_size": 1, "entries": [{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"volume": + 1, "mail_host": "example.com", "list_name": "foo", "display_name": "Foo", + "list_id": "foo.example.com", "member_count": 1, "fqdn_listname": "foo@example.com", + "http_etag": "\"98cc998d4a30293ec17da639bce10617912a6e1e\"", "self_link": + "http://localhost:9001/3.0/lists/foo.example.com"}], "http_etag": "\"89bf5f8f6c4414c38432c355907ddf9f419ef53b\""}'} headers: content-length: ['399'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -241,14 +98,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 1, "fqdn_listname": "foo@example.com", "http_etag": "\"98cc998d4a30293ec17da639bce10617912a6e1e\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -263,7 +120,132 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode '{"total_size": 6, "start": 0, "entries": [{"is_server_owner": + false, "created_on": "2015-04-17T21:49:31.438100", "http_etag": "\"d524fdd8b662872aad1e6969c73fc638065c5409\"", + "user_id": 73132381270437761542061997858084787124, "display_name": "None", + "self_link": "http://localhost:9001/3.0/users/73132381270437761542061997858084787124"}, + {"created_on": "2015-04-17T21:49:32.789798", "http_etag": "\"f4058bcaee5ef777def392ae6088cf8116015765\"", + "user_id": 132323735783051238959108775541333078032, "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/132323735783051238959108775541333078032"}, + {"created_on": "2015-04-17T21:49:33.321029", "http_etag": "\"956cef64116ce5204a8964d197b497e2c1ff72a7\"", + "user_id": 244378695232085659502002763818624648484, "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/244378695232085659502002763818624648484"}, + {"created_on": "2015-04-17T21:49:33.875568", "http_etag": "\"31197509dcfca6f7540b276e4903db73733ad82d\"", + "user_id": 57534215827853875099162175535757293119, "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/57534215827853875099162175535757293119"}, + {"created_on": "2015-04-17T21:49:33.962546", "http_etag": "\"20a55fd68ea8cc47b83312a5d6f508c00684a669\"", + "user_id": 287867428867435321086730016686195529878, "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/287867428867435321086730016686195529878"}, + {"is_server_owner": false, "created_on": "2015-04-17T21:49:39.641823", "http_etag": + "\"37779fcd1a46be2b90a29cdb676b73f83115d03b\"", "user_id": 204817555931972815975639382460590167604, + "display_name": "None", "self_link": "http://localhost:9001/3.0/users/204817555931972815975639382460590167604"}], + "http_etag": "\"32cffdc967b7ef234585d442d9e61c5eb00b3ac8\""}'} + headers: + content-length: ['1785'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/users/132323735783051238959108775541333078032 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/users/204817555931972815975639382460590167604 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/users/244378695232085659502002763818624648484 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/users/287867428867435321086730016686195529878 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/users/57534215827853875099162175535757293119 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/users/73132381270437761542061997858084787124 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} - request: @@ -280,7 +262,7 @@ headers: content-length: ['33'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 400, message: Bad Request} - request: @@ -292,14 +274,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -311,14 +292,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/domains/example.com response: - body: {string: !!python/unicode '{"mail_host": "example.com", "description": null, - "base_url": "http://example.com", "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", - "self_link": "http://localhost:9001/3.0/domains/example.com", "url_host": - "example.com"}'} + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} headers: content-length: ['233'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -334,7 +314,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] location: ['http://localhost:9001/3.0/lists/foo.example.com'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 201, message: Created} @@ -347,14 +327,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -364,14 +344,61 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '404 Not Found'} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -383,30 +410,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", - "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": - "\"4add483b459686140ce72de3c4f3ace80abba461\"", "administrivia": true, "mail_host": - "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": - "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", - "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", - "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": - "no_munging", "created_at": "2015-04-17T21:06:37.760035", "convert_html_to_plaintext": - false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:40.594602", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"b2490f4331de3e2fb48475c691beee672147e95d\"", + "autorespond_owner": "none"}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -418,30 +445,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"list_name": "foo", "default_member_action": - "defer", "anonymous_list": false, "autorespond_postings": "none", "advertised": - true, "reply_to_address": "", "send_welcome_message": true, "autorespond_owner": - "none", "autoresponse_request_text": "", "web_host": "example.com", "autoresponse_grace_period": - "90d", "volume": 1, "digest_size_threshold": 30.0, "request_address": "foo-request@example.com", - "posting_address": "foo@example.com", "first_strip_reply_to": false, "http_etag": - "\"4add483b459686140ce72de3c4f3ace80abba461\"", "administrivia": true, "mail_host": - "example.com", "include_rfc2369_headers": true, "admin_immed_notify": true, - "posting_pipeline": "default-posting-pipeline", "collapse_alternatives": true, - "autoresponse_postings_text": "", "admin_notify_mchanges": false, "last_post_at": - null, "filter_content": false, "autoresponse_owner_text": "", "join_address": - "foo-join@example.com", "scheme": "http", "subscription_policy": "confirm", - "welcome_message_uri": "mailman:///welcome.txt", "post_id": 1, "fqdn_listname": - "foo@example.com", "allow_list_posts": true, "subject_prefix": "[Foo] ", "owner_address": - "foo-owner@example.com", "archive_policy": "public", "leave_address": "foo-leave@example.com", - "description": "", "acceptable_aliases": [], "bounces_address": "foo-bounces@example.com", - "next_digest_number": 1, "default_nonmember_action": "hold", "reply_goes_to_list": - "no_munging", "created_at": "2015-04-17T21:06:37.760035", "convert_html_to_plaintext": - false, "display_name": "Foo", "autorespond_requests": "none", "no_reply_address": - "noreply@example.com", "digest_last_sent_at": null}'} + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:40.594602", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"b2490f4331de3e2fb48475c691beee672147e95d\"", + "autorespond_owner": "none"}'} headers: content-length: ['1617'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:37 GMT'] + date: ['Fri, 17 Apr 2015 21:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -453,16 +480,15 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists response: - body: {string: !!python/unicode '{"http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", - "total_size": 1, "entries": [{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}], - "start": 0}'} + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"volume": + 1, "mail_host": "example.com", "list_name": "foo", "display_name": "Foo", + "list_id": "foo.example.com", "member_count": 0, "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "self_link": + "http://localhost:9001/3.0/lists/foo.example.com"}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\""}'} headers: content-length: ['399'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -474,14 +500,14 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com response: - body: {string: !!python/unicode '{"list_name": "foo", "volume": 1, "list_id": - "foo.example.com", "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "fqdn_listname": "foo@example.com", "mail_host": "example.com", "member_count": - 0, "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\""}'} + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} headers: content-length: ['294'] content-type: [application/json; charset=utf-8] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -496,7 +522,411 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - date: ['Fri, 17 Apr 2015 21:06:38 GMT'] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode 'Duplicate email host: example.com'} + headers: + content-length: ['33'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 400, message: Bad Request} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:41.405630", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"856e1379cf0464f478e57788adda9428078008bd\"", + "autorespond_owner": "none"}'} + headers: + content-length: ['1617'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"scheme": "http", "list_name": "foo", "reply_to_address": + "", "next_digest_number": 1, "post_id": 1, "bounces_address": "foo-bounces@example.com", + "posting_pipeline": "default-posting-pipeline", "advertised": true, "no_reply_address": + "noreply@example.com", "autoresponse_owner_text": "", "last_post_at": null, + "allow_list_posts": true, "join_address": "foo-join@example.com", "acceptable_aliases": + [], "filter_content": false, "web_host": "example.com", "default_member_action": + "defer", "anonymous_list": false, "autorespond_postings": "none", "leave_address": + "foo-leave@example.com", "autoresponse_postings_text": "", "autoresponse_request_text": + "", "description": "", "admin_immed_notify": true, "collapse_alternatives": + true, "archive_policy": "public", "send_welcome_message": true, "created_at": + "2015-04-17T21:49:41.405630", "include_rfc2369_headers": true, "first_strip_reply_to": + false, "welcome_message_uri": "mailman:///welcome.txt", "administrivia": true, + "digest_last_sent_at": null, "admin_notify_mchanges": false, "digest_size_threshold": + 30.0, "default_nonmember_action": "hold", "subject_prefix": "[Foo] ", "request_address": + "foo-request@example.com", "autorespond_requests": "none", "volume": 1, "reply_goes_to_list": + "no_munging", "mail_host": "example.com", "autoresponse_grace_period": "90d", + "subscription_policy": "confirm", "display_name": "Foo", "convert_html_to_plaintext": + false, "owner_address": "foo-owner@example.com", "fqdn_listname": "foo@example.com", + "posting_address": "foo@example.com", "http_etag": "\"856e1379cf0464f478e57788adda9428078008bd\"", + "autorespond_owner": "none"}'} + headers: + content-length: ['1617'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"volume": + 1, "mail_host": "example.com", "list_name": "foo", "display_name": "Foo", + "list_id": "foo.example.com", "member_count": 0, "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "self_link": + "http://localhost:9001/3.0/lists/foo.example.com"}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\""}'} + headers: + content-length: ['399'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:41 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode 'Duplicate email host: example.com'} + headers: + content-length: ['33'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 400, message: Bad Request} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:42 GMT'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"volume": + 1, "mail_host": "example.com", "list_name": "foo", "display_name": "Foo", + "list_id": "foo.example.com", "member_count": 0, "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "self_link": + "http://localhost:9001/3.0/lists/foo.example.com"}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\""}'} + headers: + content-length: ['399'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"is_server_owner": + false, "created_on": "2015-04-17T21:49:42.543677", "http_etag": "\"9c7db56868280a314f88ebe3617eb470bbc1e12a\"", + "user_id": 145884944174755256087575342095483601919, "display_name": "None", + "self_link": "http://localhost:9001/3.0/users/145884944174755256087575342095483601919"}], + "http_etag": "\"160941918943181fd1c2b87bb76ad16144253aaf\""}'} + headers: + content-length: ['400'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/users/145884944174755256087575342095483601919 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_model-2.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_model-2.yaml new file mode 100644 index 0000000..69c4f0d --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_model-2.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '404 Not Found'} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_model.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_model.yaml new file mode 100644 index 0000000..f3c27b6 --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_model.yaml @@ -0,0 +1,378 @@ +interactions: +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode 'Duplicate email host: example.com'} + headers: + content-length: ['33'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 400, message: Bad Request} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:43 GMT'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: email=test%40example.com&display_name=None&password=None + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + location: ['http://localhost:9001/3.0/users/159257784260397180227533440746559138090'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '{"password": "$6$rounds=95855$Rg4wzIH/bNoTgh7/$.ekDh7SDIZs8zvJcR9TfkS0fcfTafl1enwMyu1nDQWWj./URa.2y7SzBtW.uw4J1ga3uLf6VBzpbklkpZW69Q.", + "is_server_owner": false, "created_on": "2015-04-17T21:49:43.933759", "http_etag": + "\"ebacc85424cc5ecbacfdda8cb213e96393a263ae\"", "user_id": 159257784260397180227533440746559138090, + "display_name": "None", "self_link": "http://localhost:9001/3.0/users/159257784260397180227533440746559138090"}'} + headers: + content-length: ['430'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/159257784260397180227533440746559138090 + response: + body: {string: !!python/unicode '{"password": "$6$rounds=95855$Rg4wzIH/bNoTgh7/$.ekDh7SDIZs8zvJcR9TfkS0fcfTafl1enwMyu1nDQWWj./URa.2y7SzBtW.uw4J1ga3uLf6VBzpbklkpZW69Q.", + "is_server_owner": false, "created_on": "2015-04-17T21:49:43.933759", "http_etag": + "\"ebacc85424cc5ecbacfdda8cb213e96393a263ae\"", "user_id": 159257784260397180227533440746559138090, + "display_name": "None", "self_link": "http://localhost:9001/3.0/users/159257784260397180227533440746559138090"}'} + headers: + content-length: ['430'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/159257784260397180227533440746559138090/addresses + response: + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"registered_on": + "2015-04-17T21:49:43.933557", "original_email": "test@example.com", "user": + "http://localhost:9001/3.0/users/159257784260397180227533440746559138090", + "http_etag": "\"87a72abf2937cee5f0f8b827d209a183d4ca37ef\"", "display_name": + "None", "email": "test@example.com", "self_link": "http://localhost:9001/3.0/addresses/test@example.com"}], + "http_etag": "\"592fabafa101540a1d1ac825b640ed6e1db1338c\""}'} + headers: + content-length: ['456'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"volume": + 1, "mail_host": "example.com", "list_name": "foo", "display_name": "Foo", + "list_id": "foo.example.com", "member_count": 0, "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "self_link": + "http://localhost:9001/3.0/lists/foo.example.com"}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\""}'} + headers: + content-length: ['399'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"password": + "$6$rounds=95855$Rg4wzIH/bNoTgh7/$.ekDh7SDIZs8zvJcR9TfkS0fcfTafl1enwMyu1nDQWWj./URa.2y7SzBtW.uw4J1ga3uLf6VBzpbklkpZW69Q.", + "is_server_owner": false, "created_on": "2015-04-17T21:49:43.933759", "http_etag": + "\"ebacc85424cc5ecbacfdda8cb213e96393a263ae\"", "user_id": 159257784260397180227533440746559138090, + "display_name": "None", "self_link": "http://localhost:9001/3.0/users/159257784260397180227533440746559138090"}], + "http_etag": "\"815c44c4f7b30eb6e8a5167e3266d44b4b38aa6e\""}'} + headers: + content-length: ['535'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/users/159257784260397180227533440746559138090 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: mail_host=example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode 'Duplicate email host: example.com'} + headers: + content-length: ['33'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 400, message: Bad Request} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/domains/example.com + response: + body: {string: !!python/unicode '{"base_url": "http://example.com", "mail_host": + "example.com", "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "url_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com"}'} + headers: + content-length: ['233'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: fqdn_listname=foo%40example.com + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + location: ['http://localhost:9001/3.0/lists/foo.example.com'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists + response: + body: {string: !!python/unicode '{"total_size": 1, "start": 0, "entries": [{"volume": + 1, "mail_host": "example.com", "list_name": "foo", "display_name": "Foo", + "list_id": "foo.example.com", "member_count": 0, "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "self_link": + "http://localhost:9001/3.0/lists/foo.example.com"}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\""}'} + headers: + content-length: ['399'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"volume": 1, "mail_host": "example.com", "list_name": + "foo", "display_name": "Foo", "list_id": "foo.example.com", "member_count": + 0, "fqdn_listname": "foo@example.com", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "self_link": "http://localhost:9001/3.0/lists/foo.example.com"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'DELETE' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0b2'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode '{"total_size": 0, "start": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\""}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Fri, 17 Apr 2015 21:49:44 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +version: 1 diff --git a/src/postorius/tests/mailman_api_tests/test_list_summary.py b/src/postorius/tests/mailman_api_tests/test_list_summary.py index 7cb3c75..dbe927d 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_summary.py +++ b/src/postorius/tests/mailman_api_tests/test_list_summary.py @@ -18,6 +18,7 @@ from django.contrib.auth.models import User from django.core.urlresolvers import reverse +from django.db import IntegrityError from django.test import Client, SimpleTestCase from django.test.utils import override_settings from urllib2 import HTTPError @@ -47,16 +48,24 @@ @MM_VCR.use_cassette('test_list_summary.yaml') def setUp(self): self.client = Client() + self.mmclient = get_client() try: - domain = get_client().create_domain('example.com') + domain = self.mmclient.create_domain('example.com') except HTTPError: - domain = get_client().get_domain('example.com') + domain = self.mmclient.get_domain('example.com') self.foo_list = domain.create_list('foo') + try: + User.objects.create_user('testuser', 'test@example.com', 'testpass') + except IntegrityError: + pass @MM_VCR.use_cassette('test_list_summary.yaml') def tearDown(self): - for mlist in get_client().lists: + for mlist in self.mmclient.lists: mlist.delete() + for user in self.mmclient.users: + user.delete() + User.objects.all().delete() @MM_VCR.use_cassette('test_list_summary.yaml') def test_list_summary_logged_out(self): @@ -72,9 +81,34 @@ @MM_VCR.use_cassette('test_list_summary.yaml') def test_list_summary_logged_in(self): # Response must contain list obj and the form. - User.objects.create_user('testuser', 'test@example.com', 'testpass') self.client.login(username='testuser', password='testpass') response = self.client.get(reverse('list_summary', args=('foo@example.com', ))) self.assertEqual(response.status_code, 200) self.assertTrue('
. + +import logging +from django.contrib.auth.models import User +from django.core.urlresolvers import reverse +from django.db import IntegrityError +from django.test import Client, SimpleTestCase +from django.test.utils import override_settings +from urllib2 import HTTPError + +from postorius.utils import get_client +from postorius.tests import MM_VCR + + +logger = logging.getLogger(__name__) +vcr_log = logging.getLogger('vcr') +vcr_log.setLevel(logging.WARNING) + + +API_CREDENTIALS = {'MAILMAN_API_URL': 'http://localhost:9001', + 'MAILMAN_USER': 'restadmin', + 'MAILMAN_PASS': 'restpass'} + + +@override_settings(**API_CREDENTIALS) +class ModelTest(SimpleTestCase): + """Tests for the list index page.""" + + @MM_VCR.use_cassette('test_model.yaml') + def setUp(self): + self.client = Client() + self.mmclient = get_client() + try: + self.domain = get_client().create_domain('example.com') + except HTTPError: + self.domain = get_client().get_domain('example.com') + self.foo_list = self.domain.create_list('foo') + + @MM_VCR.use_cassette('test_model.yaml') + def tearDown(self): + for mlist in self.mmclient.lists: + mlist.delete() + for user in self.mmclient.users: + user.delete() + User.objects.all().delete() + + @MM_VCR.use_cassette('test_model-2.yaml') + def test_mailman_user_not_created_when_flag_is_off(self): + with self.settings(AUTOCREATE_MAILMAN_USER=False): + User.objects.create_user('testuser', 'test@example.com', 'testpass') + with self.assertRaises(HTTPError): + self.mmclient.get_user('test@example.com') + + @MM_VCR.use_cassette('test_model.yaml') + def test_mailman_user_created_when_flag_is_on(self): + with self.settings(AUTOCREATE_MAILMAN_USER=True): + User.objects.create_user('testuser', 'test@example.com', 'testpass') + user = self.mmclient.get_user('test@example.com') + self.assertEqual(str(user.addresses[0]), 'test@example.com') diff --git a/src/postorius/tests/test_forms.py b/src/postorius/tests/test_forms.py index 116212c..58717bd 100644 --- a/src/postorius/tests/test_forms.py +++ b/src/postorius/tests/test_forms.py @@ -16,7 +16,8 @@ # Postorius. If not, see . from django.utils import unittest -from postorius.forms import UserPreferences, DomainNew, ListNew +from postorius.forms import (ListNew, + UserPreferences, DomainNew, ListSubscribe, ChangeSubscriptionForm) class UserPreferencesTest(unittest.TestCase): @@ -50,6 +51,47 @@ }) self.assertFalse(form.is_valid()) + +class ListSubscribeTest(unittest.TestCase): + def test_subscribe_works(self): + user_emails = ['someone@example.com'] + form = ListSubscribe(user_emails, { + 'email' : 'someone@example.com', + 'display_name' : 'Someone', + }) + self.assertTrue(form.is_valid()) + + + def test_subscribe_fails(self): + user_emails = ['someone@example.com'] + form = ListSubscribe(user_emails, { + 'email' : 'notaemail', + 'display_name' : 'Someone', + }) + self.assertFalse(form.is_valid()) + + def test_subscribe_validates_email(self): + user_emails = ['something'] + form = ListSubscribe(user_emails, { + 'email' : 'something', + 'display_name' : 'Someone', + }) + self.assertFalse(form.is_valid()) + +class ChangeSubscriptionTest(unittest.TestCase): + def test_subscription_changes_only_to_user_addresses(self): + user_emails = ['one@example.com', 'two@example.com'] + form = ChangeSubscriptionForm(user_emails, + {'email': 'abcd@d.com'}) + self.assertFalse(form.is_valid()) + + def test_subscription_works(self): + user_emails = ['one@example.com', 'two@example.com'] + form = ChangeSubscriptionForm(user_emails, + {'email': 'two@example.com'}) + self.assertTrue(form.is_valid()) + + class ListNewTest(unittest.TestCase): def test_form_fields_list(self): @@ -71,4 +113,3 @@ 'description': 'The Most Desirable organization', }) self.assertFalse(form.is_valid()) - diff --git a/src/postorius/urls.py b/src/postorius/urls.py index 302f300..cabcfc0 100644 --- a/src/postorius/urls.py +++ b/src/postorius/urls.py @@ -46,6 +46,9 @@ url(r'^subscribe$', ListSubscribeView.as_view( ), name='list_subscribe'), + url(r'^change_subscription$', + ChangeSubscriptionView.as_view(), + name='change_subscription'), url(r'^unsubscribe/(?P[^/]+)$', ListUnsubscribeView.as_view( ), name='list_unsubscribe'), diff --git a/src/postorius/views/list.py b/src/postorius/views/list.py index f3ef7da..9d5d986 100644 --- a/src/postorius/views/list.py +++ b/src/postorius/views/list.py @@ -170,26 +170,82 @@ class ListSummaryView(MailingListView): - """Shows common list metrics. """ def get(self, request, list_id): - user_email = getattr(request.user, 'email', None) - userSubscribed = False try: - userMember = self.mailing_list.get_member(user_email) - except ValueError: - pass + mm_user = MailmanUser.objects.get(address=request.user.email) + user_emails = [str(address) for address in getattr(mm_user, 'addresses')] + # TODO:maxking - add the clause below in above + # statement after the subscription policy is sorted out + # if address.verified_on is not None] + except Mailman404Error: + # The user does not have a mailman user associated with it. + user_emails = [request.user.email] + except AttributeError: + # Anonymous User, everyone logged out. + user_emails = None + + userSubscribed = False + subscribed_address = None + if user_emails is not None: + for address in user_emails: + try: + userMember = self.mailing_list.get_member(address) + except ValueError: + pass + else: + userSubscribed = True + subscribed_address = address + data = {'list': self.mailing_list, + 'userSubscribed': userSubscribed, + 'subscribed_address': subscribed_address} + if user_emails is not None: + data['change_subscription_form'] = ChangeSubscriptionForm(user_emails, + initial={'email': subscribed_address}) + data['subscribe_form'] = ListSubscribe(user_emails) else: - userSubscribed = True + data['change_subscription_form'] = None return render_to_response( - 'postorius/lists/summary.html', - {'list': self.mailing_list, - 'subscribe_form': ListSubscribe(initial={'email': user_email}), - 'userSubscribed': userSubscribed}, + 'postorius/lists/summary.html', data, context_instance=RequestContext(request)) +class ChangeSubscriptionView(MailingListView): + """Change mailing list subscription + """ + + @method_decorator(login_required) + def post(self, request, list_id): + try: + mm_user = MailmanUser.objects.get(address=request.user.email) + user_emails = [str(address) for address in mm_user.addresses] + form = ListSubscribe(user_emails, request.POST) + for address in user_emails: + try: + userMember = self.mailing_list.get_member(address) + except ValueError: + pass + else: + userSubscribed = True + old_email = address + if form.is_valid(): + email = form.cleaned_data['email'] + if old_email == email: + messages.error(request, 'You are already subscribed') + else: + self.mailing_list.unsubscribe(old_email) + self.mailing_list.subscribe(email) + messages.success(request, + 'Subscription changed to {} address'.format(email)) + else: + messages.error(request, 'Something went wrong. ' + 'Please try again.') + except MailmanApiError: + return utils.render_api_error(request) + except HTTPError, e: + messages.error(request, e.msg) + return redirect('list_summary', self.mailing_list.list_id) class ListSubscribeView(MailingListView): """ @@ -203,7 +259,13 @@ redirects to the `list_summary` view. """ try: - form = ListSubscribe(request.POST) + try: + mm_user = MailmanUser.objects.get(address=request.user.email) + user_addresses = [str(address) for address in mm_user.addresses] + except Mailman404Error: + mm_user = None + user_addresses = (request.POST.get('email'),) + form = ListSubscribe(user_addresses, request.POST) if form.is_valid(): email = request.POST.get('email') response = self.mailing_list.subscribe(